updated version #, imlib2 fixed, i forgot when the window size changes we totally...
[monky] / lua / libimlib2.c
1 /*
2 ** Lua binding: imlib2
3 ** Generated automatically by tolua++-1.0.92 on Mon Jan  4 18:45:07 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_imlib2_open (lua_State* tolua_S);
15
16 #include <Imlib2.h>
17 #include <X11/Xlib.h>
18 #define _userdata void*
19 #define TOLUA_DISABLE_tolua_imlib2_imlib_get_next_font_in_fallback_chain00
20 #define TOLUA_DISABLE_tolua_imlib2_imlib_insert_font_into_fallback_chain00
21 #define TOLUA_DISABLE_tolua_imlib2_imlib_remove_font_from_fallback_chain00
22 #define TOLUA_DISABLE_tolua_imlib2_imlib_get_prev_font_in_fallback_chain00
23 /* function to release collected object via destructor */
24 #ifdef __cplusplus
25
26 static int tolua_collect_Pixmap (lua_State* tolua_S)
27 {
28  Pixmap* self = (Pixmap*) tolua_tousertype(tolua_S,1,0);
29         Mtolua_delete(self);
30         return 0;
31 }
32
33 static int tolua_collect_Colormap (lua_State* tolua_S)
34 {
35  Colormap* self = (Colormap*) tolua_tousertype(tolua_S,1,0);
36         Mtolua_delete(self);
37         return 0;
38 }
39
40 static int tolua_collect_Drawable (lua_State* tolua_S)
41 {
42  Drawable* self = (Drawable*) tolua_tousertype(tolua_S,1,0);
43         Mtolua_delete(self);
44         return 0;
45 }
46
47 static int tolua_collect_Imlib_Progress_Function (lua_State* tolua_S)
48 {
49  Imlib_Progress_Function* self = (Imlib_Progress_Function*) tolua_tousertype(tolua_S,1,0);
50         Mtolua_delete(self);
51         return 0;
52 }
53 #endif
54
55
56 /* function to register type */
57 static void tolua_reg_types (lua_State* tolua_S)
58 {
59  tolua_usertype(tolua_S,"Visual");
60  tolua_usertype(tolua_S,"Imlib_Data_Destructor_Function");
61  tolua_usertype(tolua_S,"Imlib_Progress_Function");
62  tolua_usertype(tolua_S,"Pixmap");
63  tolua_usertype(tolua_S,"Colormap");
64  tolua_usertype(tolua_S,"Drawable");
65  tolua_usertype(tolua_S,"Display");
66  tolua_usertype(tolua_S,"XImage");
67  tolua_usertype(tolua_S,"_imlib_border");
68  tolua_usertype(tolua_S,"_imlib_color");
69 }
70
71 /* function: imlib_context_new */
72 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_new00
73 static int tolua_imlib2_imlib_context_new00(lua_State* tolua_S)
74 {
75 #ifndef TOLUA_RELEASE
76  tolua_Error tolua_err;
77  if (
78      !tolua_isnoobj(tolua_S,1,&tolua_err)
79  )
80   goto tolua_lerror;
81  else
82 #endif
83  {
84   {
85     _userdata tolua_ret = (  _userdata)  imlib_context_new();
86    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
87   }
88  }
89  return 1;
90 #ifndef TOLUA_RELEASE
91  tolua_lerror:
92  tolua_error(tolua_S,"#ferror in function 'imlib_context_new'.",&tolua_err);
93  return 0;
94 #endif
95 }
96 #endif //#ifndef TOLUA_DISABLE
97
98 /* function: imlib_context_free */
99 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_free00
100 static int tolua_imlib2_imlib_context_free00(lua_State* tolua_S)
101 {
102 #ifndef TOLUA_RELEASE
103  tolua_Error tolua_err;
104  if (
105      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
106      !tolua_isnoobj(tolua_S,2,&tolua_err)
107  )
108   goto tolua_lerror;
109  else
110 #endif
111  {
112    _userdata context = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
113   {
114    imlib_context_free(context);
115   }
116  }
117  return 0;
118 #ifndef TOLUA_RELEASE
119  tolua_lerror:
120  tolua_error(tolua_S,"#ferror in function 'imlib_context_free'.",&tolua_err);
121  return 0;
122 #endif
123 }
124 #endif //#ifndef TOLUA_DISABLE
125
126 /* function: imlib_context_push */
127 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_push00
128 static int tolua_imlib2_imlib_context_push00(lua_State* tolua_S)
129 {
130 #ifndef TOLUA_RELEASE
131  tolua_Error tolua_err;
132  if (
133      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
134      !tolua_isnoobj(tolua_S,2,&tolua_err)
135  )
136   goto tolua_lerror;
137  else
138 #endif
139  {
140    _userdata context = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
141   {
142    imlib_context_push(context);
143   }
144  }
145  return 0;
146 #ifndef TOLUA_RELEASE
147  tolua_lerror:
148  tolua_error(tolua_S,"#ferror in function 'imlib_context_push'.",&tolua_err);
149  return 0;
150 #endif
151 }
152 #endif //#ifndef TOLUA_DISABLE
153
154 /* function: imlib_context_pop */
155 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_pop00
156 static int tolua_imlib2_imlib_context_pop00(lua_State* tolua_S)
157 {
158 #ifndef TOLUA_RELEASE
159  tolua_Error tolua_err;
160  if (
161      !tolua_isnoobj(tolua_S,1,&tolua_err)
162  )
163   goto tolua_lerror;
164  else
165 #endif
166  {
167   {
168    imlib_context_pop();
169   }
170  }
171  return 0;
172 #ifndef TOLUA_RELEASE
173  tolua_lerror:
174  tolua_error(tolua_S,"#ferror in function 'imlib_context_pop'.",&tolua_err);
175  return 0;
176 #endif
177 }
178 #endif //#ifndef TOLUA_DISABLE
179
180 /* function: imlib_context_get */
181 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get00
182 static int tolua_imlib2_imlib_context_get00(lua_State* tolua_S)
183 {
184 #ifndef TOLUA_RELEASE
185  tolua_Error tolua_err;
186  if (
187      !tolua_isnoobj(tolua_S,1,&tolua_err)
188  )
189   goto tolua_lerror;
190  else
191 #endif
192  {
193   {
194     _userdata tolua_ret = (  _userdata)  imlib_context_get();
195    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
196   }
197  }
198  return 1;
199 #ifndef TOLUA_RELEASE
200  tolua_lerror:
201  tolua_error(tolua_S,"#ferror in function 'imlib_context_get'.",&tolua_err);
202  return 0;
203 #endif
204 }
205 #endif //#ifndef TOLUA_DISABLE
206
207 /* function: imlib_context_set_display */
208 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_display00
209 static int tolua_imlib2_imlib_context_set_display00(lua_State* tolua_S)
210 {
211 #ifndef TOLUA_RELEASE
212  tolua_Error tolua_err;
213  if (
214      !tolua_isusertype(tolua_S,1,"Display",0,&tolua_err) ||
215      !tolua_isnoobj(tolua_S,2,&tolua_err)
216  )
217   goto tolua_lerror;
218  else
219 #endif
220  {
221   Display* display = ((Display*)  tolua_tousertype(tolua_S,1,0));
222   {
223    imlib_context_set_display(display);
224   }
225  }
226  return 0;
227 #ifndef TOLUA_RELEASE
228  tolua_lerror:
229  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_display'.",&tolua_err);
230  return 0;
231 #endif
232 }
233 #endif //#ifndef TOLUA_DISABLE
234
235 /* function: imlib_context_disconnect_display */
236 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_disconnect_display00
237 static int tolua_imlib2_imlib_context_disconnect_display00(lua_State* tolua_S)
238 {
239 #ifndef TOLUA_RELEASE
240  tolua_Error tolua_err;
241  if (
242      !tolua_isnoobj(tolua_S,1,&tolua_err)
243  )
244   goto tolua_lerror;
245  else
246 #endif
247  {
248   {
249    imlib_context_disconnect_display();
250   }
251  }
252  return 0;
253 #ifndef TOLUA_RELEASE
254  tolua_lerror:
255  tolua_error(tolua_S,"#ferror in function 'imlib_context_disconnect_display'.",&tolua_err);
256  return 0;
257 #endif
258 }
259 #endif //#ifndef TOLUA_DISABLE
260
261 /* function: imlib_context_set_visual */
262 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_visual00
263 static int tolua_imlib2_imlib_context_set_visual00(lua_State* tolua_S)
264 {
265 #ifndef TOLUA_RELEASE
266  tolua_Error tolua_err;
267  if (
268      !tolua_isusertype(tolua_S,1,"Visual",0,&tolua_err) ||
269      !tolua_isnoobj(tolua_S,2,&tolua_err)
270  )
271   goto tolua_lerror;
272  else
273 #endif
274  {
275   Visual* visual = ((Visual*)  tolua_tousertype(tolua_S,1,0));
276   {
277    imlib_context_set_visual(visual);
278   }
279  }
280  return 0;
281 #ifndef TOLUA_RELEASE
282  tolua_lerror:
283  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_visual'.",&tolua_err);
284  return 0;
285 #endif
286 }
287 #endif //#ifndef TOLUA_DISABLE
288
289 /* function: imlib_context_set_colormap */
290 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_colormap00
291 static int tolua_imlib2_imlib_context_set_colormap00(lua_State* tolua_S)
292 {
293 #ifndef TOLUA_RELEASE
294  tolua_Error tolua_err;
295  if (
296      (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"Colormap",0,&tolua_err)) ||
297      !tolua_isnoobj(tolua_S,2,&tolua_err)
298  )
299   goto tolua_lerror;
300  else
301 #endif
302  {
303   Colormap colormap = *((Colormap*)  tolua_tousertype(tolua_S,1,0));
304   {
305    imlib_context_set_colormap(colormap);
306   }
307  }
308  return 0;
309 #ifndef TOLUA_RELEASE
310  tolua_lerror:
311  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_colormap'.",&tolua_err);
312  return 0;
313 #endif
314 }
315 #endif //#ifndef TOLUA_DISABLE
316
317 /* function: imlib_context_set_drawable */
318 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_drawable00
319 static int tolua_imlib2_imlib_context_set_drawable00(lua_State* tolua_S)
320 {
321 #ifndef TOLUA_RELEASE
322  tolua_Error tolua_err;
323  if (
324      (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"Drawable",0,&tolua_err)) ||
325      !tolua_isnoobj(tolua_S,2,&tolua_err)
326  )
327   goto tolua_lerror;
328  else
329 #endif
330  {
331   Drawable drawable = *((Drawable*)  tolua_tousertype(tolua_S,1,0));
332   {
333    imlib_context_set_drawable(drawable);
334   }
335  }
336  return 0;
337 #ifndef TOLUA_RELEASE
338  tolua_lerror:
339  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_drawable'.",&tolua_err);
340  return 0;
341 #endif
342 }
343 #endif //#ifndef TOLUA_DISABLE
344
345 /* function: imlib_context_set_mask */
346 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_mask00
347 static int tolua_imlib2_imlib_context_set_mask00(lua_State* tolua_S)
348 {
349 #ifndef TOLUA_RELEASE
350  tolua_Error tolua_err;
351  if (
352      (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"Pixmap",0,&tolua_err)) ||
353      !tolua_isnoobj(tolua_S,2,&tolua_err)
354  )
355   goto tolua_lerror;
356  else
357 #endif
358  {
359   Pixmap mask = *((Pixmap*)  tolua_tousertype(tolua_S,1,0));
360   {
361    imlib_context_set_mask(mask);
362   }
363  }
364  return 0;
365 #ifndef TOLUA_RELEASE
366  tolua_lerror:
367  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_mask'.",&tolua_err);
368  return 0;
369 #endif
370 }
371 #endif //#ifndef TOLUA_DISABLE
372
373 /* function: imlib_context_set_dither_mask */
374 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_dither_mask00
375 static int tolua_imlib2_imlib_context_set_dither_mask00(lua_State* tolua_S)
376 {
377 #ifndef TOLUA_RELEASE
378  tolua_Error tolua_err;
379  if (
380      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
381      !tolua_isnoobj(tolua_S,2,&tolua_err)
382  )
383   goto tolua_lerror;
384  else
385 #endif
386  {
387   char dither_mask = ((char)  tolua_tonumber(tolua_S,1,0));
388   {
389    imlib_context_set_dither_mask(dither_mask);
390   }
391  }
392  return 0;
393 #ifndef TOLUA_RELEASE
394  tolua_lerror:
395  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_dither_mask'.",&tolua_err);
396  return 0;
397 #endif
398 }
399 #endif //#ifndef TOLUA_DISABLE
400
401 /* function: imlib_context_set_mask_alpha_threshold */
402 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_mask_alpha_threshold00
403 static int tolua_imlib2_imlib_context_set_mask_alpha_threshold00(lua_State* tolua_S)
404 {
405 #ifndef TOLUA_RELEASE
406  tolua_Error tolua_err;
407  if (
408      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
409      !tolua_isnoobj(tolua_S,2,&tolua_err)
410  )
411   goto tolua_lerror;
412  else
413 #endif
414  {
415   int mask_alpha_threshold = ((int)  tolua_tonumber(tolua_S,1,0));
416   {
417    imlib_context_set_mask_alpha_threshold(mask_alpha_threshold);
418   }
419  }
420  return 0;
421 #ifndef TOLUA_RELEASE
422  tolua_lerror:
423  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_mask_alpha_threshold'.",&tolua_err);
424  return 0;
425 #endif
426 }
427 #endif //#ifndef TOLUA_DISABLE
428
429 /* function: imlib_context_set_anti_alias */
430 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_anti_alias00
431 static int tolua_imlib2_imlib_context_set_anti_alias00(lua_State* tolua_S)
432 {
433 #ifndef TOLUA_RELEASE
434  tolua_Error tolua_err;
435  if (
436      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
437      !tolua_isnoobj(tolua_S,2,&tolua_err)
438  )
439   goto tolua_lerror;
440  else
441 #endif
442  {
443   char anti_alias = ((char)  tolua_tonumber(tolua_S,1,0));
444   {
445    imlib_context_set_anti_alias(anti_alias);
446   }
447  }
448  return 0;
449 #ifndef TOLUA_RELEASE
450  tolua_lerror:
451  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_anti_alias'.",&tolua_err);
452  return 0;
453 #endif
454 }
455 #endif //#ifndef TOLUA_DISABLE
456
457 /* function: imlib_context_set_dither */
458 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_dither00
459 static int tolua_imlib2_imlib_context_set_dither00(lua_State* tolua_S)
460 {
461 #ifndef TOLUA_RELEASE
462  tolua_Error tolua_err;
463  if (
464      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
465      !tolua_isnoobj(tolua_S,2,&tolua_err)
466  )
467   goto tolua_lerror;
468  else
469 #endif
470  {
471   char dither = ((char)  tolua_tonumber(tolua_S,1,0));
472   {
473    imlib_context_set_dither(dither);
474   }
475  }
476  return 0;
477 #ifndef TOLUA_RELEASE
478  tolua_lerror:
479  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_dither'.",&tolua_err);
480  return 0;
481 #endif
482 }
483 #endif //#ifndef TOLUA_DISABLE
484
485 /* function: imlib_context_set_blend */
486 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_blend00
487 static int tolua_imlib2_imlib_context_set_blend00(lua_State* tolua_S)
488 {
489 #ifndef TOLUA_RELEASE
490  tolua_Error tolua_err;
491  if (
492      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
493      !tolua_isnoobj(tolua_S,2,&tolua_err)
494  )
495   goto tolua_lerror;
496  else
497 #endif
498  {
499   char blend = ((char)  tolua_tonumber(tolua_S,1,0));
500   {
501    imlib_context_set_blend(blend);
502   }
503  }
504  return 0;
505 #ifndef TOLUA_RELEASE
506  tolua_lerror:
507  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_blend'.",&tolua_err);
508  return 0;
509 #endif
510 }
511 #endif //#ifndef TOLUA_DISABLE
512
513 /* function: imlib_context_set_color_modifier */
514 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_color_modifier00
515 static int tolua_imlib2_imlib_context_set_color_modifier00(lua_State* tolua_S)
516 {
517 #ifndef TOLUA_RELEASE
518  tolua_Error tolua_err;
519  if (
520      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
521      !tolua_isnoobj(tolua_S,2,&tolua_err)
522  )
523   goto tolua_lerror;
524  else
525 #endif
526  {
527    _userdata color_modifier = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
528   {
529    imlib_context_set_color_modifier(color_modifier);
530   }
531  }
532  return 0;
533 #ifndef TOLUA_RELEASE
534  tolua_lerror:
535  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_color_modifier'.",&tolua_err);
536  return 0;
537 #endif
538 }
539 #endif //#ifndef TOLUA_DISABLE
540
541 /* function: imlib_context_set_operation */
542 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_operation00
543 static int tolua_imlib2_imlib_context_set_operation00(lua_State* tolua_S)
544 {
545 #ifndef TOLUA_RELEASE
546  tolua_Error tolua_err;
547  if (
548      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
549      !tolua_isnoobj(tolua_S,2,&tolua_err)
550  )
551   goto tolua_lerror;
552  else
553 #endif
554  {
555   Imlib_Operation operation = ((Imlib_Operation) (int)  tolua_tonumber(tolua_S,1,0));
556   {
557    imlib_context_set_operation(operation);
558   }
559  }
560  return 0;
561 #ifndef TOLUA_RELEASE
562  tolua_lerror:
563  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_operation'.",&tolua_err);
564  return 0;
565 #endif
566 }
567 #endif //#ifndef TOLUA_DISABLE
568
569 /* function: imlib_context_set_font */
570 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_font00
571 static int tolua_imlib2_imlib_context_set_font00(lua_State* tolua_S)
572 {
573 #ifndef TOLUA_RELEASE
574  tolua_Error tolua_err;
575  if (
576      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
577      !tolua_isnoobj(tolua_S,2,&tolua_err)
578  )
579   goto tolua_lerror;
580  else
581 #endif
582  {
583    _userdata font = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
584   {
585    imlib_context_set_font(font);
586   }
587  }
588  return 0;
589 #ifndef TOLUA_RELEASE
590  tolua_lerror:
591  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_font'.",&tolua_err);
592  return 0;
593 #endif
594 }
595 #endif //#ifndef TOLUA_DISABLE
596
597 /* function: imlib_context_set_direction */
598 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_direction00
599 static int tolua_imlib2_imlib_context_set_direction00(lua_State* tolua_S)
600 {
601 #ifndef TOLUA_RELEASE
602  tolua_Error tolua_err;
603  if (
604      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
605      !tolua_isnoobj(tolua_S,2,&tolua_err)
606  )
607   goto tolua_lerror;
608  else
609 #endif
610  {
611   Imlib_Text_Direction direction = ((Imlib_Text_Direction) (int)  tolua_tonumber(tolua_S,1,0));
612   {
613    imlib_context_set_direction(direction);
614   }
615  }
616  return 0;
617 #ifndef TOLUA_RELEASE
618  tolua_lerror:
619  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_direction'.",&tolua_err);
620  return 0;
621 #endif
622 }
623 #endif //#ifndef TOLUA_DISABLE
624
625 /* function: imlib_context_set_angle */
626 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_angle00
627 static int tolua_imlib2_imlib_context_set_angle00(lua_State* tolua_S)
628 {
629 #ifndef TOLUA_RELEASE
630  tolua_Error tolua_err;
631  if (
632      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
633      !tolua_isnoobj(tolua_S,2,&tolua_err)
634  )
635   goto tolua_lerror;
636  else
637 #endif
638  {
639   double angle = ((double)  tolua_tonumber(tolua_S,1,0));
640   {
641    imlib_context_set_angle(angle);
642   }
643  }
644  return 0;
645 #ifndef TOLUA_RELEASE
646  tolua_lerror:
647  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_angle'.",&tolua_err);
648  return 0;
649 #endif
650 }
651 #endif //#ifndef TOLUA_DISABLE
652
653 /* function: imlib_context_set_color */
654 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_color00
655 static int tolua_imlib2_imlib_context_set_color00(lua_State* tolua_S)
656 {
657 #ifndef TOLUA_RELEASE
658  tolua_Error tolua_err;
659  if (
660      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
661      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
662      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
663      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
664      !tolua_isnoobj(tolua_S,5,&tolua_err)
665  )
666   goto tolua_lerror;
667  else
668 #endif
669  {
670   int red = ((int)  tolua_tonumber(tolua_S,1,0));
671   int green = ((int)  tolua_tonumber(tolua_S,2,0));
672   int blue = ((int)  tolua_tonumber(tolua_S,3,0));
673   int alpha = ((int)  tolua_tonumber(tolua_S,4,0));
674   {
675    imlib_context_set_color(red,green,blue,alpha);
676   }
677  }
678  return 0;
679 #ifndef TOLUA_RELEASE
680  tolua_lerror:
681  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_color'.",&tolua_err);
682  return 0;
683 #endif
684 }
685 #endif //#ifndef TOLUA_DISABLE
686
687 /* function: imlib_context_set_color_hsva */
688 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_color_hsva00
689 static int tolua_imlib2_imlib_context_set_color_hsva00(lua_State* tolua_S)
690 {
691 #ifndef TOLUA_RELEASE
692  tolua_Error tolua_err;
693  if (
694      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
695      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
696      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
697      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
698      !tolua_isnoobj(tolua_S,5,&tolua_err)
699  )
700   goto tolua_lerror;
701  else
702 #endif
703  {
704   float hue = ((float)  tolua_tonumber(tolua_S,1,0));
705   float saturation = ((float)  tolua_tonumber(tolua_S,2,0));
706   float value = ((float)  tolua_tonumber(tolua_S,3,0));
707   int alpha = ((int)  tolua_tonumber(tolua_S,4,0));
708   {
709    imlib_context_set_color_hsva(hue,saturation,value,alpha);
710   }
711  }
712  return 0;
713 #ifndef TOLUA_RELEASE
714  tolua_lerror:
715  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_color_hsva'.",&tolua_err);
716  return 0;
717 #endif
718 }
719 #endif //#ifndef TOLUA_DISABLE
720
721 /* function: imlib_context_set_color_hlsa */
722 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_color_hlsa00
723 static int tolua_imlib2_imlib_context_set_color_hlsa00(lua_State* tolua_S)
724 {
725 #ifndef TOLUA_RELEASE
726  tolua_Error tolua_err;
727  if (
728      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
729      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
730      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
731      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
732      !tolua_isnoobj(tolua_S,5,&tolua_err)
733  )
734   goto tolua_lerror;
735  else
736 #endif
737  {
738   float hue = ((float)  tolua_tonumber(tolua_S,1,0));
739   float lightness = ((float)  tolua_tonumber(tolua_S,2,0));
740   float saturation = ((float)  tolua_tonumber(tolua_S,3,0));
741   int alpha = ((int)  tolua_tonumber(tolua_S,4,0));
742   {
743    imlib_context_set_color_hlsa(hue,lightness,saturation,alpha);
744   }
745  }
746  return 0;
747 #ifndef TOLUA_RELEASE
748  tolua_lerror:
749  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_color_hlsa'.",&tolua_err);
750  return 0;
751 #endif
752 }
753 #endif //#ifndef TOLUA_DISABLE
754
755 /* function: imlib_context_set_color_cmya */
756 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_color_cmya00
757 static int tolua_imlib2_imlib_context_set_color_cmya00(lua_State* tolua_S)
758 {
759 #ifndef TOLUA_RELEASE
760  tolua_Error tolua_err;
761  if (
762      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
763      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
764      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
765      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
766      !tolua_isnoobj(tolua_S,5,&tolua_err)
767  )
768   goto tolua_lerror;
769  else
770 #endif
771  {
772   int cyan = ((int)  tolua_tonumber(tolua_S,1,0));
773   int magenta = ((int)  tolua_tonumber(tolua_S,2,0));
774   int yellow = ((int)  tolua_tonumber(tolua_S,3,0));
775   int alpha = ((int)  tolua_tonumber(tolua_S,4,0));
776   {
777    imlib_context_set_color_cmya(cyan,magenta,yellow,alpha);
778   }
779  }
780  return 0;
781 #ifndef TOLUA_RELEASE
782  tolua_lerror:
783  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_color_cmya'.",&tolua_err);
784  return 0;
785 #endif
786 }
787 #endif //#ifndef TOLUA_DISABLE
788
789 /* function: imlib_context_set_color_range */
790 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_color_range00
791 static int tolua_imlib2_imlib_context_set_color_range00(lua_State* tolua_S)
792 {
793 #ifndef TOLUA_RELEASE
794  tolua_Error tolua_err;
795  if (
796      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
797      !tolua_isnoobj(tolua_S,2,&tolua_err)
798  )
799   goto tolua_lerror;
800  else
801 #endif
802  {
803    _userdata color_range = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
804   {
805    imlib_context_set_color_range(color_range);
806   }
807  }
808  return 0;
809 #ifndef TOLUA_RELEASE
810  tolua_lerror:
811  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_color_range'.",&tolua_err);
812  return 0;
813 #endif
814 }
815 #endif //#ifndef TOLUA_DISABLE
816
817 /* function: imlib_context_set_progress_function */
818 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_progress_function00
819 static int tolua_imlib2_imlib_context_set_progress_function00(lua_State* tolua_S)
820 {
821 #ifndef TOLUA_RELEASE
822  tolua_Error tolua_err;
823  if (
824      (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"Imlib_Progress_Function",0,&tolua_err)) ||
825      !tolua_isnoobj(tolua_S,2,&tolua_err)
826  )
827   goto tolua_lerror;
828  else
829 #endif
830  {
831   Imlib_Progress_Function progress_function = *((Imlib_Progress_Function*)  tolua_tousertype(tolua_S,1,0));
832   {
833    imlib_context_set_progress_function(progress_function);
834   }
835  }
836  return 0;
837 #ifndef TOLUA_RELEASE
838  tolua_lerror:
839  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_progress_function'.",&tolua_err);
840  return 0;
841 #endif
842 }
843 #endif //#ifndef TOLUA_DISABLE
844
845 /* function: imlib_context_set_progress_granularity */
846 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_progress_granularity00
847 static int tolua_imlib2_imlib_context_set_progress_granularity00(lua_State* tolua_S)
848 {
849 #ifndef TOLUA_RELEASE
850  tolua_Error tolua_err;
851  if (
852      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
853      !tolua_isnoobj(tolua_S,2,&tolua_err)
854  )
855   goto tolua_lerror;
856  else
857 #endif
858  {
859   char progress_granularity = ((char)  tolua_tonumber(tolua_S,1,0));
860   {
861    imlib_context_set_progress_granularity(progress_granularity);
862   }
863  }
864  return 0;
865 #ifndef TOLUA_RELEASE
866  tolua_lerror:
867  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_progress_granularity'.",&tolua_err);
868  return 0;
869 #endif
870 }
871 #endif //#ifndef TOLUA_DISABLE
872
873 /* function: imlib_context_set_image */
874 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_image00
875 static int tolua_imlib2_imlib_context_set_image00(lua_State* tolua_S)
876 {
877 #ifndef TOLUA_RELEASE
878  tolua_Error tolua_err;
879  if (
880      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
881      !tolua_isnoobj(tolua_S,2,&tolua_err)
882  )
883   goto tolua_lerror;
884  else
885 #endif
886  {
887    _userdata image = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
888   {
889    imlib_context_set_image(image);
890   }
891  }
892  return 0;
893 #ifndef TOLUA_RELEASE
894  tolua_lerror:
895  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_image'.",&tolua_err);
896  return 0;
897 #endif
898 }
899 #endif //#ifndef TOLUA_DISABLE
900
901 /* function: imlib_context_set_cliprect */
902 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_cliprect00
903 static int tolua_imlib2_imlib_context_set_cliprect00(lua_State* tolua_S)
904 {
905 #ifndef TOLUA_RELEASE
906  tolua_Error tolua_err;
907  if (
908      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
909      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
910      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
911      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
912      !tolua_isnoobj(tolua_S,5,&tolua_err)
913  )
914   goto tolua_lerror;
915  else
916 #endif
917  {
918   int x = ((int)  tolua_tonumber(tolua_S,1,0));
919   int y = ((int)  tolua_tonumber(tolua_S,2,0));
920   int w = ((int)  tolua_tonumber(tolua_S,3,0));
921   int h = ((int)  tolua_tonumber(tolua_S,4,0));
922   {
923    imlib_context_set_cliprect(x,y,w,h);
924   }
925  }
926  return 0;
927 #ifndef TOLUA_RELEASE
928  tolua_lerror:
929  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_cliprect'.",&tolua_err);
930  return 0;
931 #endif
932 }
933 #endif //#ifndef TOLUA_DISABLE
934
935 /* function: imlib_context_set_TTF_encoding */
936 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_TTF_encoding00
937 static int tolua_imlib2_imlib_context_set_TTF_encoding00(lua_State* tolua_S)
938 {
939 #ifndef TOLUA_RELEASE
940  tolua_Error tolua_err;
941  if (
942      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
943      !tolua_isnoobj(tolua_S,2,&tolua_err)
944  )
945   goto tolua_lerror;
946  else
947 #endif
948  {
949   Imlib_TTF_Encoding encoding = ((Imlib_TTF_Encoding) (int)  tolua_tonumber(tolua_S,1,0));
950   {
951    imlib_context_set_TTF_encoding(encoding);
952   }
953  }
954  return 0;
955 #ifndef TOLUA_RELEASE
956  tolua_lerror:
957  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_TTF_encoding'.",&tolua_err);
958  return 0;
959 #endif
960 }
961 #endif //#ifndef TOLUA_DISABLE
962
963 /* function: imlib_context_get_display */
964 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_display00
965 static int tolua_imlib2_imlib_context_get_display00(lua_State* tolua_S)
966 {
967 #ifndef TOLUA_RELEASE
968  tolua_Error tolua_err;
969  if (
970      !tolua_isnoobj(tolua_S,1,&tolua_err)
971  )
972   goto tolua_lerror;
973  else
974 #endif
975  {
976   {
977    Display* tolua_ret = (Display*)  imlib_context_get_display();
978     tolua_pushusertype(tolua_S,(void*)tolua_ret,"Display");
979   }
980  }
981  return 1;
982 #ifndef TOLUA_RELEASE
983  tolua_lerror:
984  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_display'.",&tolua_err);
985  return 0;
986 #endif
987 }
988 #endif //#ifndef TOLUA_DISABLE
989
990 /* function: imlib_context_get_visual */
991 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_visual00
992 static int tolua_imlib2_imlib_context_get_visual00(lua_State* tolua_S)
993 {
994 #ifndef TOLUA_RELEASE
995  tolua_Error tolua_err;
996  if (
997      !tolua_isnoobj(tolua_S,1,&tolua_err)
998  )
999   goto tolua_lerror;
1000  else
1001 #endif
1002  {
1003   {
1004    Visual* tolua_ret = (Visual*)  imlib_context_get_visual();
1005     tolua_pushusertype(tolua_S,(void*)tolua_ret,"Visual");
1006   }
1007  }
1008  return 1;
1009 #ifndef TOLUA_RELEASE
1010  tolua_lerror:
1011  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_visual'.",&tolua_err);
1012  return 0;
1013 #endif
1014 }
1015 #endif //#ifndef TOLUA_DISABLE
1016
1017 /* function: imlib_context_get_colormap */
1018 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_colormap00
1019 static int tolua_imlib2_imlib_context_get_colormap00(lua_State* tolua_S)
1020 {
1021 #ifndef TOLUA_RELEASE
1022  tolua_Error tolua_err;
1023  if (
1024      !tolua_isnoobj(tolua_S,1,&tolua_err)
1025  )
1026   goto tolua_lerror;
1027  else
1028 #endif
1029  {
1030   {
1031    Colormap tolua_ret = (Colormap)  imlib_context_get_colormap();
1032    {
1033 #ifdef __cplusplus
1034     void* tolua_obj = Mtolua_new((Colormap)(tolua_ret));
1035      tolua_pushusertype(tolua_S,tolua_obj,"Colormap");
1036     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1037 #else
1038     void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Colormap));
1039      tolua_pushusertype(tolua_S,tolua_obj,"Colormap");
1040     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1041 #endif
1042    }
1043   }
1044  }
1045  return 1;
1046 #ifndef TOLUA_RELEASE
1047  tolua_lerror:
1048  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_colormap'.",&tolua_err);
1049  return 0;
1050 #endif
1051 }
1052 #endif //#ifndef TOLUA_DISABLE
1053
1054 /* function: imlib_context_get_drawable */
1055 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_drawable00
1056 static int tolua_imlib2_imlib_context_get_drawable00(lua_State* tolua_S)
1057 {
1058 #ifndef TOLUA_RELEASE
1059  tolua_Error tolua_err;
1060  if (
1061      !tolua_isnoobj(tolua_S,1,&tolua_err)
1062  )
1063   goto tolua_lerror;
1064  else
1065 #endif
1066  {
1067   {
1068    Drawable tolua_ret = (Drawable)  imlib_context_get_drawable();
1069    {
1070 #ifdef __cplusplus
1071     void* tolua_obj = Mtolua_new((Drawable)(tolua_ret));
1072      tolua_pushusertype(tolua_S,tolua_obj,"Drawable");
1073     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1074 #else
1075     void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Drawable));
1076      tolua_pushusertype(tolua_S,tolua_obj,"Drawable");
1077     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1078 #endif
1079    }
1080   }
1081  }
1082  return 1;
1083 #ifndef TOLUA_RELEASE
1084  tolua_lerror:
1085  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_drawable'.",&tolua_err);
1086  return 0;
1087 #endif
1088 }
1089 #endif //#ifndef TOLUA_DISABLE
1090
1091 /* function: imlib_context_get_mask */
1092 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_mask00
1093 static int tolua_imlib2_imlib_context_get_mask00(lua_State* tolua_S)
1094 {
1095 #ifndef TOLUA_RELEASE
1096  tolua_Error tolua_err;
1097  if (
1098      !tolua_isnoobj(tolua_S,1,&tolua_err)
1099  )
1100   goto tolua_lerror;
1101  else
1102 #endif
1103  {
1104   {
1105    Pixmap tolua_ret = (Pixmap)  imlib_context_get_mask();
1106    {
1107 #ifdef __cplusplus
1108     void* tolua_obj = Mtolua_new((Pixmap)(tolua_ret));
1109      tolua_pushusertype(tolua_S,tolua_obj,"Pixmap");
1110     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1111 #else
1112     void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Pixmap));
1113      tolua_pushusertype(tolua_S,tolua_obj,"Pixmap");
1114     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1115 #endif
1116    }
1117   }
1118  }
1119  return 1;
1120 #ifndef TOLUA_RELEASE
1121  tolua_lerror:
1122  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_mask'.",&tolua_err);
1123  return 0;
1124 #endif
1125 }
1126 #endif //#ifndef TOLUA_DISABLE
1127
1128 /* function: imlib_context_get_dither_mask */
1129 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_dither_mask00
1130 static int tolua_imlib2_imlib_context_get_dither_mask00(lua_State* tolua_S)
1131 {
1132 #ifndef TOLUA_RELEASE
1133  tolua_Error tolua_err;
1134  if (
1135      !tolua_isnoobj(tolua_S,1,&tolua_err)
1136  )
1137   goto tolua_lerror;
1138  else
1139 #endif
1140  {
1141   {
1142    char tolua_ret = (char)  imlib_context_get_dither_mask();
1143    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1144   }
1145  }
1146  return 1;
1147 #ifndef TOLUA_RELEASE
1148  tolua_lerror:
1149  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_dither_mask'.",&tolua_err);
1150  return 0;
1151 #endif
1152 }
1153 #endif //#ifndef TOLUA_DISABLE
1154
1155 /* function: imlib_context_get_anti_alias */
1156 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_anti_alias00
1157 static int tolua_imlib2_imlib_context_get_anti_alias00(lua_State* tolua_S)
1158 {
1159 #ifndef TOLUA_RELEASE
1160  tolua_Error tolua_err;
1161  if (
1162      !tolua_isnoobj(tolua_S,1,&tolua_err)
1163  )
1164   goto tolua_lerror;
1165  else
1166 #endif
1167  {
1168   {
1169    char tolua_ret = (char)  imlib_context_get_anti_alias();
1170    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1171   }
1172  }
1173  return 1;
1174 #ifndef TOLUA_RELEASE
1175  tolua_lerror:
1176  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_anti_alias'.",&tolua_err);
1177  return 0;
1178 #endif
1179 }
1180 #endif //#ifndef TOLUA_DISABLE
1181
1182 /* function: imlib_context_get_mask_alpha_threshold */
1183 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_mask_alpha_threshold00
1184 static int tolua_imlib2_imlib_context_get_mask_alpha_threshold00(lua_State* tolua_S)
1185 {
1186 #ifndef TOLUA_RELEASE
1187  tolua_Error tolua_err;
1188  if (
1189      !tolua_isnoobj(tolua_S,1,&tolua_err)
1190  )
1191   goto tolua_lerror;
1192  else
1193 #endif
1194  {
1195   {
1196    int tolua_ret = (int)  imlib_context_get_mask_alpha_threshold();
1197    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1198   }
1199  }
1200  return 1;
1201 #ifndef TOLUA_RELEASE
1202  tolua_lerror:
1203  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_mask_alpha_threshold'.",&tolua_err);
1204  return 0;
1205 #endif
1206 }
1207 #endif //#ifndef TOLUA_DISABLE
1208
1209 /* function: imlib_context_get_dither */
1210 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_dither00
1211 static int tolua_imlib2_imlib_context_get_dither00(lua_State* tolua_S)
1212 {
1213 #ifndef TOLUA_RELEASE
1214  tolua_Error tolua_err;
1215  if (
1216      !tolua_isnoobj(tolua_S,1,&tolua_err)
1217  )
1218   goto tolua_lerror;
1219  else
1220 #endif
1221  {
1222   {
1223    char tolua_ret = (char)  imlib_context_get_dither();
1224    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1225   }
1226  }
1227  return 1;
1228 #ifndef TOLUA_RELEASE
1229  tolua_lerror:
1230  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_dither'.",&tolua_err);
1231  return 0;
1232 #endif
1233 }
1234 #endif //#ifndef TOLUA_DISABLE
1235
1236 /* function: imlib_context_get_blend */
1237 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_blend00
1238 static int tolua_imlib2_imlib_context_get_blend00(lua_State* tolua_S)
1239 {
1240 #ifndef TOLUA_RELEASE
1241  tolua_Error tolua_err;
1242  if (
1243      !tolua_isnoobj(tolua_S,1,&tolua_err)
1244  )
1245   goto tolua_lerror;
1246  else
1247 #endif
1248  {
1249   {
1250    char tolua_ret = (char)  imlib_context_get_blend();
1251    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1252   }
1253  }
1254  return 1;
1255 #ifndef TOLUA_RELEASE
1256  tolua_lerror:
1257  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_blend'.",&tolua_err);
1258  return 0;
1259 #endif
1260 }
1261 #endif //#ifndef TOLUA_DISABLE
1262
1263 /* function: imlib_context_get_color_modifier */
1264 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_color_modifier00
1265 static int tolua_imlib2_imlib_context_get_color_modifier00(lua_State* tolua_S)
1266 {
1267 #ifndef TOLUA_RELEASE
1268  tolua_Error tolua_err;
1269  if (
1270      !tolua_isnoobj(tolua_S,1,&tolua_err)
1271  )
1272   goto tolua_lerror;
1273  else
1274 #endif
1275  {
1276   {
1277     _userdata tolua_ret = (  _userdata)  imlib_context_get_color_modifier();
1278    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
1279   }
1280  }
1281  return 1;
1282 #ifndef TOLUA_RELEASE
1283  tolua_lerror:
1284  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_color_modifier'.",&tolua_err);
1285  return 0;
1286 #endif
1287 }
1288 #endif //#ifndef TOLUA_DISABLE
1289
1290 /* function: imlib_context_get_operation */
1291 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_operation00
1292 static int tolua_imlib2_imlib_context_get_operation00(lua_State* tolua_S)
1293 {
1294 #ifndef TOLUA_RELEASE
1295  tolua_Error tolua_err;
1296  if (
1297      !tolua_isnoobj(tolua_S,1,&tolua_err)
1298  )
1299   goto tolua_lerror;
1300  else
1301 #endif
1302  {
1303   {
1304    Imlib_Operation tolua_ret = (Imlib_Operation)  imlib_context_get_operation();
1305    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1306   }
1307  }
1308  return 1;
1309 #ifndef TOLUA_RELEASE
1310  tolua_lerror:
1311  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_operation'.",&tolua_err);
1312  return 0;
1313 #endif
1314 }
1315 #endif //#ifndef TOLUA_DISABLE
1316
1317 /* function: imlib_context_get_font */
1318 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_font00
1319 static int tolua_imlib2_imlib_context_get_font00(lua_State* tolua_S)
1320 {
1321 #ifndef TOLUA_RELEASE
1322  tolua_Error tolua_err;
1323  if (
1324      !tolua_isnoobj(tolua_S,1,&tolua_err)
1325  )
1326   goto tolua_lerror;
1327  else
1328 #endif
1329  {
1330   {
1331     _userdata tolua_ret = (  _userdata)  imlib_context_get_font();
1332    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
1333   }
1334  }
1335  return 1;
1336 #ifndef TOLUA_RELEASE
1337  tolua_lerror:
1338  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_font'.",&tolua_err);
1339  return 0;
1340 #endif
1341 }
1342 #endif //#ifndef TOLUA_DISABLE
1343
1344 /* function: imlib_context_get_angle */
1345 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_angle00
1346 static int tolua_imlib2_imlib_context_get_angle00(lua_State* tolua_S)
1347 {
1348 #ifndef TOLUA_RELEASE
1349  tolua_Error tolua_err;
1350  if (
1351      !tolua_isnoobj(tolua_S,1,&tolua_err)
1352  )
1353   goto tolua_lerror;
1354  else
1355 #endif
1356  {
1357   {
1358    double tolua_ret = (double)  imlib_context_get_angle();
1359    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1360   }
1361  }
1362  return 1;
1363 #ifndef TOLUA_RELEASE
1364  tolua_lerror:
1365  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_angle'.",&tolua_err);
1366  return 0;
1367 #endif
1368 }
1369 #endif //#ifndef TOLUA_DISABLE
1370
1371 /* function: imlib_context_get_direction */
1372 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_direction00
1373 static int tolua_imlib2_imlib_context_get_direction00(lua_State* tolua_S)
1374 {
1375 #ifndef TOLUA_RELEASE
1376  tolua_Error tolua_err;
1377  if (
1378      !tolua_isnoobj(tolua_S,1,&tolua_err)
1379  )
1380   goto tolua_lerror;
1381  else
1382 #endif
1383  {
1384   {
1385    Imlib_Text_Direction tolua_ret = (Imlib_Text_Direction)  imlib_context_get_direction();
1386    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1387   }
1388  }
1389  return 1;
1390 #ifndef TOLUA_RELEASE
1391  tolua_lerror:
1392  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_direction'.",&tolua_err);
1393  return 0;
1394 #endif
1395 }
1396 #endif //#ifndef TOLUA_DISABLE
1397
1398 /* function: imlib_context_get_color */
1399 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_color00
1400 static int tolua_imlib2_imlib_context_get_color00(lua_State* tolua_S)
1401 {
1402 #ifndef TOLUA_RELEASE
1403  tolua_Error tolua_err;
1404  if (
1405      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
1406      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1407      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1408      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1409      !tolua_isnoobj(tolua_S,5,&tolua_err)
1410  )
1411   goto tolua_lerror;
1412  else
1413 #endif
1414  {
1415   int red = ((int)  tolua_tonumber(tolua_S,1,0));
1416   int green = ((int)  tolua_tonumber(tolua_S,2,0));
1417   int blue = ((int)  tolua_tonumber(tolua_S,3,0));
1418   int alpha = ((int)  tolua_tonumber(tolua_S,4,0));
1419   {
1420    imlib_context_get_color(&red,&green,&blue,&alpha);
1421    tolua_pushnumber(tolua_S,(lua_Number)red);
1422    tolua_pushnumber(tolua_S,(lua_Number)green);
1423    tolua_pushnumber(tolua_S,(lua_Number)blue);
1424    tolua_pushnumber(tolua_S,(lua_Number)alpha);
1425   }
1426  }
1427  return 4;
1428 #ifndef TOLUA_RELEASE
1429  tolua_lerror:
1430  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_color'.",&tolua_err);
1431  return 0;
1432 #endif
1433 }
1434 #endif //#ifndef TOLUA_DISABLE
1435
1436 /* function: imlib_context_get_color_hsva */
1437 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_color_hsva00
1438 static int tolua_imlib2_imlib_context_get_color_hsva00(lua_State* tolua_S)
1439 {
1440 #ifndef TOLUA_RELEASE
1441  tolua_Error tolua_err;
1442  if (
1443      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
1444      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1445      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1446      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1447      !tolua_isnoobj(tolua_S,5,&tolua_err)
1448  )
1449   goto tolua_lerror;
1450  else
1451 #endif
1452  {
1453   float hue = ((float)  tolua_tonumber(tolua_S,1,0));
1454   float saturation = ((float)  tolua_tonumber(tolua_S,2,0));
1455   float value = ((float)  tolua_tonumber(tolua_S,3,0));
1456   int alpha = ((int)  tolua_tonumber(tolua_S,4,0));
1457   {
1458    imlib_context_get_color_hsva(&hue,&saturation,&value,&alpha);
1459    tolua_pushnumber(tolua_S,(lua_Number)hue);
1460    tolua_pushnumber(tolua_S,(lua_Number)saturation);
1461    tolua_pushnumber(tolua_S,(lua_Number)value);
1462    tolua_pushnumber(tolua_S,(lua_Number)alpha);
1463   }
1464  }
1465  return 4;
1466 #ifndef TOLUA_RELEASE
1467  tolua_lerror:
1468  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_color_hsva'.",&tolua_err);
1469  return 0;
1470 #endif
1471 }
1472 #endif //#ifndef TOLUA_DISABLE
1473
1474 /* function: imlib_context_get_color_hlsa */
1475 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_color_hlsa00
1476 static int tolua_imlib2_imlib_context_get_color_hlsa00(lua_State* tolua_S)
1477 {
1478 #ifndef TOLUA_RELEASE
1479  tolua_Error tolua_err;
1480  if (
1481      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
1482      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1483      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1484      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1485      !tolua_isnoobj(tolua_S,5,&tolua_err)
1486  )
1487   goto tolua_lerror;
1488  else
1489 #endif
1490  {
1491   float hue = ((float)  tolua_tonumber(tolua_S,1,0));
1492   float lightness = ((float)  tolua_tonumber(tolua_S,2,0));
1493   float saturation = ((float)  tolua_tonumber(tolua_S,3,0));
1494   int alpha = ((int)  tolua_tonumber(tolua_S,4,0));
1495   {
1496    imlib_context_get_color_hlsa(&hue,&lightness,&saturation,&alpha);
1497    tolua_pushnumber(tolua_S,(lua_Number)hue);
1498    tolua_pushnumber(tolua_S,(lua_Number)lightness);
1499    tolua_pushnumber(tolua_S,(lua_Number)saturation);
1500    tolua_pushnumber(tolua_S,(lua_Number)alpha);
1501   }
1502  }
1503  return 4;
1504 #ifndef TOLUA_RELEASE
1505  tolua_lerror:
1506  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_color_hlsa'.",&tolua_err);
1507  return 0;
1508 #endif
1509 }
1510 #endif //#ifndef TOLUA_DISABLE
1511
1512 /* function: imlib_context_get_color_cmya */
1513 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_color_cmya00
1514 static int tolua_imlib2_imlib_context_get_color_cmya00(lua_State* tolua_S)
1515 {
1516 #ifndef TOLUA_RELEASE
1517  tolua_Error tolua_err;
1518  if (
1519      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
1520      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1521      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1522      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1523      !tolua_isnoobj(tolua_S,5,&tolua_err)
1524  )
1525   goto tolua_lerror;
1526  else
1527 #endif
1528  {
1529   int cyan = ((int)  tolua_tonumber(tolua_S,1,0));
1530   int magenta = ((int)  tolua_tonumber(tolua_S,2,0));
1531   int yellow = ((int)  tolua_tonumber(tolua_S,3,0));
1532   int alpha = ((int)  tolua_tonumber(tolua_S,4,0));
1533   {
1534    imlib_context_get_color_cmya(&cyan,&magenta,&yellow,&alpha);
1535    tolua_pushnumber(tolua_S,(lua_Number)cyan);
1536    tolua_pushnumber(tolua_S,(lua_Number)magenta);
1537    tolua_pushnumber(tolua_S,(lua_Number)yellow);
1538    tolua_pushnumber(tolua_S,(lua_Number)alpha);
1539   }
1540  }
1541  return 4;
1542 #ifndef TOLUA_RELEASE
1543  tolua_lerror:
1544  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_color_cmya'.",&tolua_err);
1545  return 0;
1546 #endif
1547 }
1548 #endif //#ifndef TOLUA_DISABLE
1549
1550 /* function: imlib_context_get_imlib_color */
1551 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_imlib_color00
1552 static int tolua_imlib2_imlib_context_get_imlib_color00(lua_State* tolua_S)
1553 {
1554 #ifndef TOLUA_RELEASE
1555  tolua_Error tolua_err;
1556  if (
1557      !tolua_isnoobj(tolua_S,1,&tolua_err)
1558  )
1559   goto tolua_lerror;
1560  else
1561 #endif
1562  {
1563   {
1564    struct _imlib_color* tolua_ret = ( struct _imlib_color*)  imlib_context_get_imlib_color();
1565     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_imlib_color");
1566   }
1567  }
1568  return 1;
1569 #ifndef TOLUA_RELEASE
1570  tolua_lerror:
1571  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_imlib_color'.",&tolua_err);
1572  return 0;
1573 #endif
1574 }
1575 #endif //#ifndef TOLUA_DISABLE
1576
1577 /* function: imlib_context_get_color_range */
1578 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_color_range00
1579 static int tolua_imlib2_imlib_context_get_color_range00(lua_State* tolua_S)
1580 {
1581 #ifndef TOLUA_RELEASE
1582  tolua_Error tolua_err;
1583  if (
1584      !tolua_isnoobj(tolua_S,1,&tolua_err)
1585  )
1586   goto tolua_lerror;
1587  else
1588 #endif
1589  {
1590   {
1591     _userdata tolua_ret = (  _userdata)  imlib_context_get_color_range();
1592    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
1593   }
1594  }
1595  return 1;
1596 #ifndef TOLUA_RELEASE
1597  tolua_lerror:
1598  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_color_range'.",&tolua_err);
1599  return 0;
1600 #endif
1601 }
1602 #endif //#ifndef TOLUA_DISABLE
1603
1604 /* function: imlib_context_get_progress_function */
1605 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_progress_function00
1606 static int tolua_imlib2_imlib_context_get_progress_function00(lua_State* tolua_S)
1607 {
1608 #ifndef TOLUA_RELEASE
1609  tolua_Error tolua_err;
1610  if (
1611      !tolua_isnoobj(tolua_S,1,&tolua_err)
1612  )
1613   goto tolua_lerror;
1614  else
1615 #endif
1616  {
1617   {
1618    Imlib_Progress_Function tolua_ret = (Imlib_Progress_Function)  imlib_context_get_progress_function();
1619    {
1620 #ifdef __cplusplus
1621     void* tolua_obj = Mtolua_new((Imlib_Progress_Function)(tolua_ret));
1622      tolua_pushusertype(tolua_S,tolua_obj,"Imlib_Progress_Function");
1623     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1624 #else
1625     void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Imlib_Progress_Function));
1626      tolua_pushusertype(tolua_S,tolua_obj,"Imlib_Progress_Function");
1627     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1628 #endif
1629    }
1630   }
1631  }
1632  return 1;
1633 #ifndef TOLUA_RELEASE
1634  tolua_lerror:
1635  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_progress_function'.",&tolua_err);
1636  return 0;
1637 #endif
1638 }
1639 #endif //#ifndef TOLUA_DISABLE
1640
1641 /* function: imlib_context_get_progress_granularity */
1642 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_progress_granularity00
1643 static int tolua_imlib2_imlib_context_get_progress_granularity00(lua_State* tolua_S)
1644 {
1645 #ifndef TOLUA_RELEASE
1646  tolua_Error tolua_err;
1647  if (
1648      !tolua_isnoobj(tolua_S,1,&tolua_err)
1649  )
1650   goto tolua_lerror;
1651  else
1652 #endif
1653  {
1654   {
1655    char tolua_ret = (char)  imlib_context_get_progress_granularity();
1656    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1657   }
1658  }
1659  return 1;
1660 #ifndef TOLUA_RELEASE
1661  tolua_lerror:
1662  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_progress_granularity'.",&tolua_err);
1663  return 0;
1664 #endif
1665 }
1666 #endif //#ifndef TOLUA_DISABLE
1667
1668 /* function: imlib_context_get_image */
1669 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_image00
1670 static int tolua_imlib2_imlib_context_get_image00(lua_State* tolua_S)
1671 {
1672 #ifndef TOLUA_RELEASE
1673  tolua_Error tolua_err;
1674  if (
1675      !tolua_isnoobj(tolua_S,1,&tolua_err)
1676  )
1677   goto tolua_lerror;
1678  else
1679 #endif
1680  {
1681   {
1682     _userdata tolua_ret = (  _userdata)  imlib_context_get_image();
1683    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
1684   }
1685  }
1686  return 1;
1687 #ifndef TOLUA_RELEASE
1688  tolua_lerror:
1689  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_image'.",&tolua_err);
1690  return 0;
1691 #endif
1692 }
1693 #endif //#ifndef TOLUA_DISABLE
1694
1695 /* function: imlib_context_get_cliprect */
1696 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_cliprect00
1697 static int tolua_imlib2_imlib_context_get_cliprect00(lua_State* tolua_S)
1698 {
1699 #ifndef TOLUA_RELEASE
1700  tolua_Error tolua_err;
1701  if (
1702      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
1703      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1704      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1705      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1706      !tolua_isnoobj(tolua_S,5,&tolua_err)
1707  )
1708   goto tolua_lerror;
1709  else
1710 #endif
1711  {
1712   int x = ((int)  tolua_tonumber(tolua_S,1,0));
1713   int y = ((int)  tolua_tonumber(tolua_S,2,0));
1714   int w = ((int)  tolua_tonumber(tolua_S,3,0));
1715   int h = ((int)  tolua_tonumber(tolua_S,4,0));
1716   {
1717    imlib_context_get_cliprect(&x,&y,&w,&h);
1718    tolua_pushnumber(tolua_S,(lua_Number)x);
1719    tolua_pushnumber(tolua_S,(lua_Number)y);
1720    tolua_pushnumber(tolua_S,(lua_Number)w);
1721    tolua_pushnumber(tolua_S,(lua_Number)h);
1722   }
1723  }
1724  return 4;
1725 #ifndef TOLUA_RELEASE
1726  tolua_lerror:
1727  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_cliprect'.",&tolua_err);
1728  return 0;
1729 #endif
1730 }
1731 #endif //#ifndef TOLUA_DISABLE
1732
1733 /* function: imlib_context_get_TTF_encoding */
1734 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_TTF_encoding00
1735 static int tolua_imlib2_imlib_context_get_TTF_encoding00(lua_State* tolua_S)
1736 {
1737 #ifndef TOLUA_RELEASE
1738  tolua_Error tolua_err;
1739  if (
1740      !tolua_isnoobj(tolua_S,1,&tolua_err)
1741  )
1742   goto tolua_lerror;
1743  else
1744 #endif
1745  {
1746   {
1747    Imlib_TTF_Encoding tolua_ret = (Imlib_TTF_Encoding)  imlib_context_get_TTF_encoding();
1748    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1749   }
1750  }
1751  return 1;
1752 #ifndef TOLUA_RELEASE
1753  tolua_lerror:
1754  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_TTF_encoding'.",&tolua_err);
1755  return 0;
1756 #endif
1757 }
1758 #endif //#ifndef TOLUA_DISABLE
1759
1760 /* function: imlib_get_cache_size */
1761 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_cache_size00
1762 static int tolua_imlib2_imlib_get_cache_size00(lua_State* tolua_S)
1763 {
1764 #ifndef TOLUA_RELEASE
1765  tolua_Error tolua_err;
1766  if (
1767      !tolua_isnoobj(tolua_S,1,&tolua_err)
1768  )
1769   goto tolua_lerror;
1770  else
1771 #endif
1772  {
1773   {
1774    int tolua_ret = (int)  imlib_get_cache_size();
1775    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1776   }
1777  }
1778  return 1;
1779 #ifndef TOLUA_RELEASE
1780  tolua_lerror:
1781  tolua_error(tolua_S,"#ferror in function 'imlib_get_cache_size'.",&tolua_err);
1782  return 0;
1783 #endif
1784 }
1785 #endif //#ifndef TOLUA_DISABLE
1786
1787 /* function: imlib_set_cache_size */
1788 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_set_cache_size00
1789 static int tolua_imlib2_imlib_set_cache_size00(lua_State* tolua_S)
1790 {
1791 #ifndef TOLUA_RELEASE
1792  tolua_Error tolua_err;
1793  if (
1794      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
1795      !tolua_isnoobj(tolua_S,2,&tolua_err)
1796  )
1797   goto tolua_lerror;
1798  else
1799 #endif
1800  {
1801   int bytes = ((int)  tolua_tonumber(tolua_S,1,0));
1802   {
1803    imlib_set_cache_size(bytes);
1804   }
1805  }
1806  return 0;
1807 #ifndef TOLUA_RELEASE
1808  tolua_lerror:
1809  tolua_error(tolua_S,"#ferror in function 'imlib_set_cache_size'.",&tolua_err);
1810  return 0;
1811 #endif
1812 }
1813 #endif //#ifndef TOLUA_DISABLE
1814
1815 /* function: imlib_get_color_usage */
1816 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_color_usage00
1817 static int tolua_imlib2_imlib_get_color_usage00(lua_State* tolua_S)
1818 {
1819 #ifndef TOLUA_RELEASE
1820  tolua_Error tolua_err;
1821  if (
1822      !tolua_isnoobj(tolua_S,1,&tolua_err)
1823  )
1824   goto tolua_lerror;
1825  else
1826 #endif
1827  {
1828   {
1829    int tolua_ret = (int)  imlib_get_color_usage();
1830    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1831   }
1832  }
1833  return 1;
1834 #ifndef TOLUA_RELEASE
1835  tolua_lerror:
1836  tolua_error(tolua_S,"#ferror in function 'imlib_get_color_usage'.",&tolua_err);
1837  return 0;
1838 #endif
1839 }
1840 #endif //#ifndef TOLUA_DISABLE
1841
1842 /* function: imlib_set_color_usage */
1843 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_set_color_usage00
1844 static int tolua_imlib2_imlib_set_color_usage00(lua_State* tolua_S)
1845 {
1846 #ifndef TOLUA_RELEASE
1847  tolua_Error tolua_err;
1848  if (
1849      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
1850      !tolua_isnoobj(tolua_S,2,&tolua_err)
1851  )
1852   goto tolua_lerror;
1853  else
1854 #endif
1855  {
1856   int max = ((int)  tolua_tonumber(tolua_S,1,0));
1857   {
1858    imlib_set_color_usage(max);
1859   }
1860  }
1861  return 0;
1862 #ifndef TOLUA_RELEASE
1863  tolua_lerror:
1864  tolua_error(tolua_S,"#ferror in function 'imlib_set_color_usage'.",&tolua_err);
1865  return 0;
1866 #endif
1867 }
1868 #endif //#ifndef TOLUA_DISABLE
1869
1870 /* function: imlib_flush_loaders */
1871 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_flush_loaders00
1872 static int tolua_imlib2_imlib_flush_loaders00(lua_State* tolua_S)
1873 {
1874 #ifndef TOLUA_RELEASE
1875  tolua_Error tolua_err;
1876  if (
1877      !tolua_isnoobj(tolua_S,1,&tolua_err)
1878  )
1879   goto tolua_lerror;
1880  else
1881 #endif
1882  {
1883   {
1884    imlib_flush_loaders();
1885   }
1886  }
1887  return 0;
1888 #ifndef TOLUA_RELEASE
1889  tolua_lerror:
1890  tolua_error(tolua_S,"#ferror in function 'imlib_flush_loaders'.",&tolua_err);
1891  return 0;
1892 #endif
1893 }
1894 #endif //#ifndef TOLUA_DISABLE
1895
1896 /* function: imlib_get_visual_depth */
1897 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_visual_depth00
1898 static int tolua_imlib2_imlib_get_visual_depth00(lua_State* tolua_S)
1899 {
1900 #ifndef TOLUA_RELEASE
1901  tolua_Error tolua_err;
1902  if (
1903      !tolua_isusertype(tolua_S,1,"Display",0,&tolua_err) ||
1904      !tolua_isusertype(tolua_S,2,"Visual",0,&tolua_err) ||
1905      !tolua_isnoobj(tolua_S,3,&tolua_err)
1906  )
1907   goto tolua_lerror;
1908  else
1909 #endif
1910  {
1911   Display* display = ((Display*)  tolua_tousertype(tolua_S,1,0));
1912   Visual* visual = ((Visual*)  tolua_tousertype(tolua_S,2,0));
1913   {
1914    int tolua_ret = (int)  imlib_get_visual_depth(display,visual);
1915    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1916   }
1917  }
1918  return 1;
1919 #ifndef TOLUA_RELEASE
1920  tolua_lerror:
1921  tolua_error(tolua_S,"#ferror in function 'imlib_get_visual_depth'.",&tolua_err);
1922  return 0;
1923 #endif
1924 }
1925 #endif //#ifndef TOLUA_DISABLE
1926
1927 /* function: imlib_get_best_visual */
1928 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_best_visual00
1929 static int tolua_imlib2_imlib_get_best_visual00(lua_State* tolua_S)
1930 {
1931 #ifndef TOLUA_RELEASE
1932  tolua_Error tolua_err;
1933  if (
1934      !tolua_isusertype(tolua_S,1,"Display",0,&tolua_err) ||
1935      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1936      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1937      !tolua_isnoobj(tolua_S,4,&tolua_err)
1938  )
1939   goto tolua_lerror;
1940  else
1941 #endif
1942  {
1943   Display* display = ((Display*)  tolua_tousertype(tolua_S,1,0));
1944   int screen = ((int)  tolua_tonumber(tolua_S,2,0));
1945   int depth_return = ((int)  tolua_tonumber(tolua_S,3,0));
1946   {
1947    Visual* tolua_ret = (Visual*)  imlib_get_best_visual(display,screen,&depth_return);
1948     tolua_pushusertype(tolua_S,(void*)tolua_ret,"Visual");
1949    tolua_pushnumber(tolua_S,(lua_Number)depth_return);
1950   }
1951  }
1952  return 2;
1953 #ifndef TOLUA_RELEASE
1954  tolua_lerror:
1955  tolua_error(tolua_S,"#ferror in function 'imlib_get_best_visual'.",&tolua_err);
1956  return 0;
1957 #endif
1958 }
1959 #endif //#ifndef TOLUA_DISABLE
1960
1961 /* function: imlib_load_image */
1962 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_load_image00
1963 static int tolua_imlib2_imlib_load_image00(lua_State* tolua_S)
1964 {
1965 #ifndef TOLUA_RELEASE
1966  tolua_Error tolua_err;
1967  if (
1968      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
1969      !tolua_isnoobj(tolua_S,2,&tolua_err)
1970  )
1971   goto tolua_lerror;
1972  else
1973 #endif
1974  {
1975   const char* file = ((const char*)  tolua_tostring(tolua_S,1,0));
1976   {
1977     _userdata tolua_ret = (  _userdata)  imlib_load_image(file);
1978    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
1979   }
1980  }
1981  return 1;
1982 #ifndef TOLUA_RELEASE
1983  tolua_lerror:
1984  tolua_error(tolua_S,"#ferror in function 'imlib_load_image'.",&tolua_err);
1985  return 0;
1986 #endif
1987 }
1988 #endif //#ifndef TOLUA_DISABLE
1989
1990 /* function: imlib_load_image_immediately */
1991 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_load_image_immediately00
1992 static int tolua_imlib2_imlib_load_image_immediately00(lua_State* tolua_S)
1993 {
1994 #ifndef TOLUA_RELEASE
1995  tolua_Error tolua_err;
1996  if (
1997      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
1998      !tolua_isnoobj(tolua_S,2,&tolua_err)
1999  )
2000   goto tolua_lerror;
2001  else
2002 #endif
2003  {
2004   const char* file = ((const char*)  tolua_tostring(tolua_S,1,0));
2005   {
2006     _userdata tolua_ret = (  _userdata)  imlib_load_image_immediately(file);
2007    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
2008   }
2009  }
2010  return 1;
2011 #ifndef TOLUA_RELEASE
2012  tolua_lerror:
2013  tolua_error(tolua_S,"#ferror in function 'imlib_load_image_immediately'.",&tolua_err);
2014  return 0;
2015 #endif
2016 }
2017 #endif //#ifndef TOLUA_DISABLE
2018
2019 /* function: imlib_load_image_without_cache */
2020 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_load_image_without_cache00
2021 static int tolua_imlib2_imlib_load_image_without_cache00(lua_State* tolua_S)
2022 {
2023 #ifndef TOLUA_RELEASE
2024  tolua_Error tolua_err;
2025  if (
2026      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
2027      !tolua_isnoobj(tolua_S,2,&tolua_err)
2028  )
2029   goto tolua_lerror;
2030  else
2031 #endif
2032  {
2033   const char* file = ((const char*)  tolua_tostring(tolua_S,1,0));
2034   {
2035     _userdata tolua_ret = (  _userdata)  imlib_load_image_without_cache(file);
2036    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
2037   }
2038  }
2039  return 1;
2040 #ifndef TOLUA_RELEASE
2041  tolua_lerror:
2042  tolua_error(tolua_S,"#ferror in function 'imlib_load_image_without_cache'.",&tolua_err);
2043  return 0;
2044 #endif
2045 }
2046 #endif //#ifndef TOLUA_DISABLE
2047
2048 /* function: imlib_load_image_immediately_without_cache */
2049 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_load_image_immediately_without_cache00
2050 static int tolua_imlib2_imlib_load_image_immediately_without_cache00(lua_State* tolua_S)
2051 {
2052 #ifndef TOLUA_RELEASE
2053  tolua_Error tolua_err;
2054  if (
2055      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
2056      !tolua_isnoobj(tolua_S,2,&tolua_err)
2057  )
2058   goto tolua_lerror;
2059  else
2060 #endif
2061  {
2062   const char* file = ((const char*)  tolua_tostring(tolua_S,1,0));
2063   {
2064     _userdata tolua_ret = (  _userdata)  imlib_load_image_immediately_without_cache(file);
2065    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
2066   }
2067  }
2068  return 1;
2069 #ifndef TOLUA_RELEASE
2070  tolua_lerror:
2071  tolua_error(tolua_S,"#ferror in function 'imlib_load_image_immediately_without_cache'.",&tolua_err);
2072  return 0;
2073 #endif
2074 }
2075 #endif //#ifndef TOLUA_DISABLE
2076
2077 /* function: imlib_load_image_with_error_return */
2078 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_load_image_with_error_return00
2079 static int tolua_imlib2_imlib_load_image_with_error_return00(lua_State* tolua_S)
2080 {
2081 #ifndef TOLUA_RELEASE
2082  tolua_Error tolua_err;
2083  if (
2084      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
2085      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2086      !tolua_isnoobj(tolua_S,3,&tolua_err)
2087  )
2088   goto tolua_lerror;
2089  else
2090 #endif
2091  {
2092   const char* file = ((const char*)  tolua_tostring(tolua_S,1,0));
2093   Imlib_Load_Error error_return = ((Imlib_Load_Error) (int)  tolua_tonumber(tolua_S,2,0));
2094   {
2095     _userdata tolua_ret = (  _userdata)  imlib_load_image_with_error_return(file,&error_return);
2096    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
2097    tolua_pushnumber(tolua_S,(lua_Number)error_return);
2098   }
2099  }
2100  return 2;
2101 #ifndef TOLUA_RELEASE
2102  tolua_lerror:
2103  tolua_error(tolua_S,"#ferror in function 'imlib_load_image_with_error_return'.",&tolua_err);
2104  return 0;
2105 #endif
2106 }
2107 #endif //#ifndef TOLUA_DISABLE
2108
2109 /* function: imlib_free_image */
2110 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_free_image00
2111 static int tolua_imlib2_imlib_free_image00(lua_State* tolua_S)
2112 {
2113 #ifndef TOLUA_RELEASE
2114  tolua_Error tolua_err;
2115  if (
2116      !tolua_isnoobj(tolua_S,1,&tolua_err)
2117  )
2118   goto tolua_lerror;
2119  else
2120 #endif
2121  {
2122   {
2123    imlib_free_image();
2124   }
2125  }
2126  return 0;
2127 #ifndef TOLUA_RELEASE
2128  tolua_lerror:
2129  tolua_error(tolua_S,"#ferror in function 'imlib_free_image'.",&tolua_err);
2130  return 0;
2131 #endif
2132 }
2133 #endif //#ifndef TOLUA_DISABLE
2134
2135 /* function: imlib_free_image_and_decache */
2136 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_free_image_and_decache00
2137 static int tolua_imlib2_imlib_free_image_and_decache00(lua_State* tolua_S)
2138 {
2139 #ifndef TOLUA_RELEASE
2140  tolua_Error tolua_err;
2141  if (
2142      !tolua_isnoobj(tolua_S,1,&tolua_err)
2143  )
2144   goto tolua_lerror;
2145  else
2146 #endif
2147  {
2148   {
2149    imlib_free_image_and_decache();
2150   }
2151  }
2152  return 0;
2153 #ifndef TOLUA_RELEASE
2154  tolua_lerror:
2155  tolua_error(tolua_S,"#ferror in function 'imlib_free_image_and_decache'.",&tolua_err);
2156  return 0;
2157 #endif
2158 }
2159 #endif //#ifndef TOLUA_DISABLE
2160
2161 /* function: imlib_image_get_width */
2162 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_get_width00
2163 static int tolua_imlib2_imlib_image_get_width00(lua_State* tolua_S)
2164 {
2165 #ifndef TOLUA_RELEASE
2166  tolua_Error tolua_err;
2167  if (
2168      !tolua_isnoobj(tolua_S,1,&tolua_err)
2169  )
2170   goto tolua_lerror;
2171  else
2172 #endif
2173  {
2174   {
2175    int tolua_ret = (int)  imlib_image_get_width();
2176    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2177   }
2178  }
2179  return 1;
2180 #ifndef TOLUA_RELEASE
2181  tolua_lerror:
2182  tolua_error(tolua_S,"#ferror in function 'imlib_image_get_width'.",&tolua_err);
2183  return 0;
2184 #endif
2185 }
2186 #endif //#ifndef TOLUA_DISABLE
2187
2188 /* function: imlib_image_get_height */
2189 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_get_height00
2190 static int tolua_imlib2_imlib_image_get_height00(lua_State* tolua_S)
2191 {
2192 #ifndef TOLUA_RELEASE
2193  tolua_Error tolua_err;
2194  if (
2195      !tolua_isnoobj(tolua_S,1,&tolua_err)
2196  )
2197   goto tolua_lerror;
2198  else
2199 #endif
2200  {
2201   {
2202    int tolua_ret = (int)  imlib_image_get_height();
2203    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2204   }
2205  }
2206  return 1;
2207 #ifndef TOLUA_RELEASE
2208  tolua_lerror:
2209  tolua_error(tolua_S,"#ferror in function 'imlib_image_get_height'.",&tolua_err);
2210  return 0;
2211 #endif
2212 }
2213 #endif //#ifndef TOLUA_DISABLE
2214
2215 /* function: imlib_image_get_filename */
2216 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_get_filename00
2217 static int tolua_imlib2_imlib_image_get_filename00(lua_State* tolua_S)
2218 {
2219 #ifndef TOLUA_RELEASE
2220  tolua_Error tolua_err;
2221  if (
2222      !tolua_isnoobj(tolua_S,1,&tolua_err)
2223  )
2224   goto tolua_lerror;
2225  else
2226 #endif
2227  {
2228   {
2229    const char* tolua_ret = (const char*)  imlib_image_get_filename();
2230    tolua_pushstring(tolua_S,(const char*)tolua_ret);
2231   }
2232  }
2233  return 1;
2234 #ifndef TOLUA_RELEASE
2235  tolua_lerror:
2236  tolua_error(tolua_S,"#ferror in function 'imlib_image_get_filename'.",&tolua_err);
2237  return 0;
2238 #endif
2239 }
2240 #endif //#ifndef TOLUA_DISABLE
2241
2242 /* function: imlib_image_get_data */
2243 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_get_data00
2244 static int tolua_imlib2_imlib_image_get_data00(lua_State* tolua_S)
2245 {
2246 #ifndef TOLUA_RELEASE
2247  tolua_Error tolua_err;
2248  if (
2249      !tolua_isnoobj(tolua_S,1,&tolua_err)
2250  )
2251   goto tolua_lerror;
2252  else
2253 #endif
2254  {
2255   {
2256    void* tolua_ret = (void*)  imlib_image_get_data();
2257    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
2258   }
2259  }
2260  return 1;
2261 #ifndef TOLUA_RELEASE
2262  tolua_lerror:
2263  tolua_error(tolua_S,"#ferror in function 'imlib_image_get_data'.",&tolua_err);
2264  return 0;
2265 #endif
2266 }
2267 #endif //#ifndef TOLUA_DISABLE
2268
2269 /* function: imlib_image_get_data_for_reading_only */
2270 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_get_data_for_reading_only00
2271 static int tolua_imlib2_imlib_image_get_data_for_reading_only00(lua_State* tolua_S)
2272 {
2273 #ifndef TOLUA_RELEASE
2274  tolua_Error tolua_err;
2275  if (
2276      !tolua_isnoobj(tolua_S,1,&tolua_err)
2277  )
2278   goto tolua_lerror;
2279  else
2280 #endif
2281  {
2282   {
2283    void* tolua_ret = (void*)  imlib_image_get_data_for_reading_only();
2284    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
2285   }
2286  }
2287  return 1;
2288 #ifndef TOLUA_RELEASE
2289  tolua_lerror:
2290  tolua_error(tolua_S,"#ferror in function 'imlib_image_get_data_for_reading_only'.",&tolua_err);
2291  return 0;
2292 #endif
2293 }
2294 #endif //#ifndef TOLUA_DISABLE
2295
2296 /* function: imlib_image_put_back_data */
2297 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_put_back_data00
2298 static int tolua_imlib2_imlib_image_put_back_data00(lua_State* tolua_S)
2299 {
2300 #ifndef TOLUA_RELEASE
2301  tolua_Error tolua_err;
2302  if (
2303      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2304      !tolua_isnoobj(tolua_S,2,&tolua_err)
2305  )
2306   goto tolua_lerror;
2307  else
2308 #endif
2309  {
2310   unsigned int data = ((unsigned int)  tolua_tonumber(tolua_S,1,0));
2311   {
2312    imlib_image_put_back_data(&data);
2313    tolua_pushnumber(tolua_S,(lua_Number)data);
2314   }
2315  }
2316  return 1;
2317 #ifndef TOLUA_RELEASE
2318  tolua_lerror:
2319  tolua_error(tolua_S,"#ferror in function 'imlib_image_put_back_data'.",&tolua_err);
2320  return 0;
2321 #endif
2322 }
2323 #endif //#ifndef TOLUA_DISABLE
2324
2325 /* function: imlib_image_has_alpha */
2326 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_has_alpha00
2327 static int tolua_imlib2_imlib_image_has_alpha00(lua_State* tolua_S)
2328 {
2329 #ifndef TOLUA_RELEASE
2330  tolua_Error tolua_err;
2331  if (
2332      !tolua_isnoobj(tolua_S,1,&tolua_err)
2333  )
2334   goto tolua_lerror;
2335  else
2336 #endif
2337  {
2338   {
2339    char tolua_ret = (char)  imlib_image_has_alpha();
2340    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2341   }
2342  }
2343  return 1;
2344 #ifndef TOLUA_RELEASE
2345  tolua_lerror:
2346  tolua_error(tolua_S,"#ferror in function 'imlib_image_has_alpha'.",&tolua_err);
2347  return 0;
2348 #endif
2349 }
2350 #endif //#ifndef TOLUA_DISABLE
2351
2352 /* function: imlib_image_set_changes_on_disk */
2353 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_set_changes_on_disk00
2354 static int tolua_imlib2_imlib_image_set_changes_on_disk00(lua_State* tolua_S)
2355 {
2356 #ifndef TOLUA_RELEASE
2357  tolua_Error tolua_err;
2358  if (
2359      !tolua_isnoobj(tolua_S,1,&tolua_err)
2360  )
2361   goto tolua_lerror;
2362  else
2363 #endif
2364  {
2365   {
2366    imlib_image_set_changes_on_disk();
2367   }
2368  }
2369  return 0;
2370 #ifndef TOLUA_RELEASE
2371  tolua_lerror:
2372  tolua_error(tolua_S,"#ferror in function 'imlib_image_set_changes_on_disk'.",&tolua_err);
2373  return 0;
2374 #endif
2375 }
2376 #endif //#ifndef TOLUA_DISABLE
2377
2378 /* function: imlib_image_get_border */
2379 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_get_border00
2380 static int tolua_imlib2_imlib_image_get_border00(lua_State* tolua_S)
2381 {
2382 #ifndef TOLUA_RELEASE
2383  tolua_Error tolua_err;
2384  if (
2385      !tolua_isusertype(tolua_S,1,"_imlib_border",0,&tolua_err) ||
2386      !tolua_isnoobj(tolua_S,2,&tolua_err)
2387  )
2388   goto tolua_lerror;
2389  else
2390 #endif
2391  {
2392   struct _imlib_border* border = (( struct _imlib_border*)  tolua_tousertype(tolua_S,1,0));
2393   {
2394    imlib_image_get_border(border);
2395   }
2396  }
2397  return 0;
2398 #ifndef TOLUA_RELEASE
2399  tolua_lerror:
2400  tolua_error(tolua_S,"#ferror in function 'imlib_image_get_border'.",&tolua_err);
2401  return 0;
2402 #endif
2403 }
2404 #endif //#ifndef TOLUA_DISABLE
2405
2406 /* function: imlib_image_set_border */
2407 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_set_border00
2408 static int tolua_imlib2_imlib_image_set_border00(lua_State* tolua_S)
2409 {
2410 #ifndef TOLUA_RELEASE
2411  tolua_Error tolua_err;
2412  if (
2413      !tolua_isusertype(tolua_S,1,"_imlib_border",0,&tolua_err) ||
2414      !tolua_isnoobj(tolua_S,2,&tolua_err)
2415  )
2416   goto tolua_lerror;
2417  else
2418 #endif
2419  {
2420   struct _imlib_border* border = (( struct _imlib_border*)  tolua_tousertype(tolua_S,1,0));
2421   {
2422    imlib_image_set_border(border);
2423   }
2424  }
2425  return 0;
2426 #ifndef TOLUA_RELEASE
2427  tolua_lerror:
2428  tolua_error(tolua_S,"#ferror in function 'imlib_image_set_border'.",&tolua_err);
2429  return 0;
2430 #endif
2431 }
2432 #endif //#ifndef TOLUA_DISABLE
2433
2434 /* function: imlib_image_set_format */
2435 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_set_format00
2436 static int tolua_imlib2_imlib_image_set_format00(lua_State* tolua_S)
2437 {
2438 #ifndef TOLUA_RELEASE
2439  tolua_Error tolua_err;
2440  if (
2441      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
2442      !tolua_isnoobj(tolua_S,2,&tolua_err)
2443  )
2444   goto tolua_lerror;
2445  else
2446 #endif
2447  {
2448   const char* format = ((const char*)  tolua_tostring(tolua_S,1,0));
2449   {
2450    imlib_image_set_format(format);
2451   }
2452  }
2453  return 0;
2454 #ifndef TOLUA_RELEASE
2455  tolua_lerror:
2456  tolua_error(tolua_S,"#ferror in function 'imlib_image_set_format'.",&tolua_err);
2457  return 0;
2458 #endif
2459 }
2460 #endif //#ifndef TOLUA_DISABLE
2461
2462 /* function: imlib_image_set_irrelevant_format */
2463 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_set_irrelevant_format00
2464 static int tolua_imlib2_imlib_image_set_irrelevant_format00(lua_State* tolua_S)
2465 {
2466 #ifndef TOLUA_RELEASE
2467  tolua_Error tolua_err;
2468  if (
2469      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2470      !tolua_isnoobj(tolua_S,2,&tolua_err)
2471  )
2472   goto tolua_lerror;
2473  else
2474 #endif
2475  {
2476   char irrelevant = ((char)  tolua_tonumber(tolua_S,1,0));
2477   {
2478    imlib_image_set_irrelevant_format(irrelevant);
2479   }
2480  }
2481  return 0;
2482 #ifndef TOLUA_RELEASE
2483  tolua_lerror:
2484  tolua_error(tolua_S,"#ferror in function 'imlib_image_set_irrelevant_format'.",&tolua_err);
2485  return 0;
2486 #endif
2487 }
2488 #endif //#ifndef TOLUA_DISABLE
2489
2490 /* function: imlib_image_set_irrelevant_border */
2491 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_set_irrelevant_border00
2492 static int tolua_imlib2_imlib_image_set_irrelevant_border00(lua_State* tolua_S)
2493 {
2494 #ifndef TOLUA_RELEASE
2495  tolua_Error tolua_err;
2496  if (
2497      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2498      !tolua_isnoobj(tolua_S,2,&tolua_err)
2499  )
2500   goto tolua_lerror;
2501  else
2502 #endif
2503  {
2504   char irrelevant = ((char)  tolua_tonumber(tolua_S,1,0));
2505   {
2506    imlib_image_set_irrelevant_border(irrelevant);
2507   }
2508  }
2509  return 0;
2510 #ifndef TOLUA_RELEASE
2511  tolua_lerror:
2512  tolua_error(tolua_S,"#ferror in function 'imlib_image_set_irrelevant_border'.",&tolua_err);
2513  return 0;
2514 #endif
2515 }
2516 #endif //#ifndef TOLUA_DISABLE
2517
2518 /* function: imlib_image_set_irrelevant_alpha */
2519 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_set_irrelevant_alpha00
2520 static int tolua_imlib2_imlib_image_set_irrelevant_alpha00(lua_State* tolua_S)
2521 {
2522 #ifndef TOLUA_RELEASE
2523  tolua_Error tolua_err;
2524  if (
2525      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2526      !tolua_isnoobj(tolua_S,2,&tolua_err)
2527  )
2528   goto tolua_lerror;
2529  else
2530 #endif
2531  {
2532   char irrelevant = ((char)  tolua_tonumber(tolua_S,1,0));
2533   {
2534    imlib_image_set_irrelevant_alpha(irrelevant);
2535   }
2536  }
2537  return 0;
2538 #ifndef TOLUA_RELEASE
2539  tolua_lerror:
2540  tolua_error(tolua_S,"#ferror in function 'imlib_image_set_irrelevant_alpha'.",&tolua_err);
2541  return 0;
2542 #endif
2543 }
2544 #endif //#ifndef TOLUA_DISABLE
2545
2546 /* function: imlib_image_format */
2547 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_format00
2548 static int tolua_imlib2_imlib_image_format00(lua_State* tolua_S)
2549 {
2550 #ifndef TOLUA_RELEASE
2551  tolua_Error tolua_err;
2552  if (
2553      !tolua_isnoobj(tolua_S,1,&tolua_err)
2554  )
2555   goto tolua_lerror;
2556  else
2557 #endif
2558  {
2559   {
2560    char* tolua_ret = (char*)  imlib_image_format();
2561    tolua_pushstring(tolua_S,(const char*)tolua_ret);
2562   }
2563  }
2564  return 1;
2565 #ifndef TOLUA_RELEASE
2566  tolua_lerror:
2567  tolua_error(tolua_S,"#ferror in function 'imlib_image_format'.",&tolua_err);
2568  return 0;
2569 #endif
2570 }
2571 #endif //#ifndef TOLUA_DISABLE
2572
2573 /* function: imlib_image_set_has_alpha */
2574 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_set_has_alpha00
2575 static int tolua_imlib2_imlib_image_set_has_alpha00(lua_State* tolua_S)
2576 {
2577 #ifndef TOLUA_RELEASE
2578  tolua_Error tolua_err;
2579  if (
2580      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2581      !tolua_isnoobj(tolua_S,2,&tolua_err)
2582  )
2583   goto tolua_lerror;
2584  else
2585 #endif
2586  {
2587   char has_alpha = ((char)  tolua_tonumber(tolua_S,1,0));
2588   {
2589    imlib_image_set_has_alpha(has_alpha);
2590   }
2591  }
2592  return 0;
2593 #ifndef TOLUA_RELEASE
2594  tolua_lerror:
2595  tolua_error(tolua_S,"#ferror in function 'imlib_image_set_has_alpha'.",&tolua_err);
2596  return 0;
2597 #endif
2598 }
2599 #endif //#ifndef TOLUA_DISABLE
2600
2601 /* function: imlib_image_query_pixel */
2602 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_query_pixel00
2603 static int tolua_imlib2_imlib_image_query_pixel00(lua_State* tolua_S)
2604 {
2605 #ifndef TOLUA_RELEASE
2606  tolua_Error tolua_err;
2607  if (
2608      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2609      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2610      !tolua_isusertype(tolua_S,3,"_imlib_color",0,&tolua_err) ||
2611      !tolua_isnoobj(tolua_S,4,&tolua_err)
2612  )
2613   goto tolua_lerror;
2614  else
2615 #endif
2616  {
2617   int x = ((int)  tolua_tonumber(tolua_S,1,0));
2618   int y = ((int)  tolua_tonumber(tolua_S,2,0));
2619   struct _imlib_color* color_return = (( struct _imlib_color*)  tolua_tousertype(tolua_S,3,0));
2620   {
2621    imlib_image_query_pixel(x,y,color_return);
2622   }
2623  }
2624  return 0;
2625 #ifndef TOLUA_RELEASE
2626  tolua_lerror:
2627  tolua_error(tolua_S,"#ferror in function 'imlib_image_query_pixel'.",&tolua_err);
2628  return 0;
2629 #endif
2630 }
2631 #endif //#ifndef TOLUA_DISABLE
2632
2633 /* function: imlib_image_query_pixel_hsva */
2634 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_query_pixel_hsva00
2635 static int tolua_imlib2_imlib_image_query_pixel_hsva00(lua_State* tolua_S)
2636 {
2637 #ifndef TOLUA_RELEASE
2638  tolua_Error tolua_err;
2639  if (
2640      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2641      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2642      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2643      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2644      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2645      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
2646      !tolua_isnoobj(tolua_S,7,&tolua_err)
2647  )
2648   goto tolua_lerror;
2649  else
2650 #endif
2651  {
2652   int x = ((int)  tolua_tonumber(tolua_S,1,0));
2653   int y = ((int)  tolua_tonumber(tolua_S,2,0));
2654   float hue = ((float)  tolua_tonumber(tolua_S,3,0));
2655   float saturation = ((float)  tolua_tonumber(tolua_S,4,0));
2656   float value = ((float)  tolua_tonumber(tolua_S,5,0));
2657   int alpha = ((int)  tolua_tonumber(tolua_S,6,0));
2658   {
2659    imlib_image_query_pixel_hsva(x,y,&hue,&saturation,&value,&alpha);
2660    tolua_pushnumber(tolua_S,(lua_Number)hue);
2661    tolua_pushnumber(tolua_S,(lua_Number)saturation);
2662    tolua_pushnumber(tolua_S,(lua_Number)value);
2663    tolua_pushnumber(tolua_S,(lua_Number)alpha);
2664   }
2665  }
2666  return 4;
2667 #ifndef TOLUA_RELEASE
2668  tolua_lerror:
2669  tolua_error(tolua_S,"#ferror in function 'imlib_image_query_pixel_hsva'.",&tolua_err);
2670  return 0;
2671 #endif
2672 }
2673 #endif //#ifndef TOLUA_DISABLE
2674
2675 /* function: imlib_image_query_pixel_hlsa */
2676 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_query_pixel_hlsa00
2677 static int tolua_imlib2_imlib_image_query_pixel_hlsa00(lua_State* tolua_S)
2678 {
2679 #ifndef TOLUA_RELEASE
2680  tolua_Error tolua_err;
2681  if (
2682      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2683      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2684      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2685      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2686      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2687      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
2688      !tolua_isnoobj(tolua_S,7,&tolua_err)
2689  )
2690   goto tolua_lerror;
2691  else
2692 #endif
2693  {
2694   int x = ((int)  tolua_tonumber(tolua_S,1,0));
2695   int y = ((int)  tolua_tonumber(tolua_S,2,0));
2696   float hue = ((float)  tolua_tonumber(tolua_S,3,0));
2697   float lightness = ((float)  tolua_tonumber(tolua_S,4,0));
2698   float saturation = ((float)  tolua_tonumber(tolua_S,5,0));
2699   int alpha = ((int)  tolua_tonumber(tolua_S,6,0));
2700   {
2701    imlib_image_query_pixel_hlsa(x,y,&hue,&lightness,&saturation,&alpha);
2702    tolua_pushnumber(tolua_S,(lua_Number)hue);
2703    tolua_pushnumber(tolua_S,(lua_Number)lightness);
2704    tolua_pushnumber(tolua_S,(lua_Number)saturation);
2705    tolua_pushnumber(tolua_S,(lua_Number)alpha);
2706   }
2707  }
2708  return 4;
2709 #ifndef TOLUA_RELEASE
2710  tolua_lerror:
2711  tolua_error(tolua_S,"#ferror in function 'imlib_image_query_pixel_hlsa'.",&tolua_err);
2712  return 0;
2713 #endif
2714 }
2715 #endif //#ifndef TOLUA_DISABLE
2716
2717 /* function: imlib_image_query_pixel_cmya */
2718 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_query_pixel_cmya00
2719 static int tolua_imlib2_imlib_image_query_pixel_cmya00(lua_State* tolua_S)
2720 {
2721 #ifndef TOLUA_RELEASE
2722  tolua_Error tolua_err;
2723  if (
2724      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2725      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2726      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2727      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2728      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2729      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
2730      !tolua_isnoobj(tolua_S,7,&tolua_err)
2731  )
2732   goto tolua_lerror;
2733  else
2734 #endif
2735  {
2736   int x = ((int)  tolua_tonumber(tolua_S,1,0));
2737   int y = ((int)  tolua_tonumber(tolua_S,2,0));
2738   int cyan = ((int)  tolua_tonumber(tolua_S,3,0));
2739   int magenta = ((int)  tolua_tonumber(tolua_S,4,0));
2740   int yellow = ((int)  tolua_tonumber(tolua_S,5,0));
2741   int alpha = ((int)  tolua_tonumber(tolua_S,6,0));
2742   {
2743    imlib_image_query_pixel_cmya(x,y,&cyan,&magenta,&yellow,&alpha);
2744    tolua_pushnumber(tolua_S,(lua_Number)cyan);
2745    tolua_pushnumber(tolua_S,(lua_Number)magenta);
2746    tolua_pushnumber(tolua_S,(lua_Number)yellow);
2747    tolua_pushnumber(tolua_S,(lua_Number)alpha);
2748   }
2749  }
2750  return 4;
2751 #ifndef TOLUA_RELEASE
2752  tolua_lerror:
2753  tolua_error(tolua_S,"#ferror in function 'imlib_image_query_pixel_cmya'.",&tolua_err);
2754  return 0;
2755 #endif
2756 }
2757 #endif //#ifndef TOLUA_DISABLE
2758
2759 /* function: imlib_render_pixmaps_for_whole_image */
2760 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_render_pixmaps_for_whole_image00
2761 static int tolua_imlib2_imlib_render_pixmaps_for_whole_image00(lua_State* tolua_S)
2762 {
2763 #ifndef TOLUA_RELEASE
2764  tolua_Error tolua_err;
2765  if (
2766      !tolua_isusertype(tolua_S,1,"Pixmap",0,&tolua_err) ||
2767      !tolua_isusertype(tolua_S,2,"Pixmap",0,&tolua_err) ||
2768      !tolua_isnoobj(tolua_S,3,&tolua_err)
2769  )
2770   goto tolua_lerror;
2771  else
2772 #endif
2773  {
2774   Pixmap* pixmap_return = ((Pixmap*)  tolua_tousertype(tolua_S,1,0));
2775   Pixmap* mask_return = ((Pixmap*)  tolua_tousertype(tolua_S,2,0));
2776   {
2777    imlib_render_pixmaps_for_whole_image(pixmap_return,mask_return);
2778   }
2779  }
2780  return 0;
2781 #ifndef TOLUA_RELEASE
2782  tolua_lerror:
2783  tolua_error(tolua_S,"#ferror in function 'imlib_render_pixmaps_for_whole_image'.",&tolua_err);
2784  return 0;
2785 #endif
2786 }
2787 #endif //#ifndef TOLUA_DISABLE
2788
2789 /* function: imlib_render_pixmaps_for_whole_image_at_size */
2790 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_render_pixmaps_for_whole_image_at_size00
2791 static int tolua_imlib2_imlib_render_pixmaps_for_whole_image_at_size00(lua_State* tolua_S)
2792 {
2793 #ifndef TOLUA_RELEASE
2794  tolua_Error tolua_err;
2795  if (
2796      !tolua_isusertype(tolua_S,1,"Pixmap",0,&tolua_err) ||
2797      !tolua_isusertype(tolua_S,2,"Pixmap",0,&tolua_err) ||
2798      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2799      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2800      !tolua_isnoobj(tolua_S,5,&tolua_err)
2801  )
2802   goto tolua_lerror;
2803  else
2804 #endif
2805  {
2806   Pixmap* pixmap_return = ((Pixmap*)  tolua_tousertype(tolua_S,1,0));
2807   Pixmap* mask_return = ((Pixmap*)  tolua_tousertype(tolua_S,2,0));
2808   int width = ((int)  tolua_tonumber(tolua_S,3,0));
2809   int height = ((int)  tolua_tonumber(tolua_S,4,0));
2810   {
2811    imlib_render_pixmaps_for_whole_image_at_size(pixmap_return,mask_return,width,height);
2812   }
2813  }
2814  return 0;
2815 #ifndef TOLUA_RELEASE
2816  tolua_lerror:
2817  tolua_error(tolua_S,"#ferror in function 'imlib_render_pixmaps_for_whole_image_at_size'.",&tolua_err);
2818  return 0;
2819 #endif
2820 }
2821 #endif //#ifndef TOLUA_DISABLE
2822
2823 /* function: imlib_free_pixmap_and_mask */
2824 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_free_pixmap_and_mask00
2825 static int tolua_imlib2_imlib_free_pixmap_and_mask00(lua_State* tolua_S)
2826 {
2827 #ifndef TOLUA_RELEASE
2828  tolua_Error tolua_err;
2829  if (
2830      (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"Pixmap",0,&tolua_err)) ||
2831      !tolua_isnoobj(tolua_S,2,&tolua_err)
2832  )
2833   goto tolua_lerror;
2834  else
2835 #endif
2836  {
2837   Pixmap pixmap = *((Pixmap*)  tolua_tousertype(tolua_S,1,0));
2838   {
2839    imlib_free_pixmap_and_mask(pixmap);
2840   }
2841  }
2842  return 0;
2843 #ifndef TOLUA_RELEASE
2844  tolua_lerror:
2845  tolua_error(tolua_S,"#ferror in function 'imlib_free_pixmap_and_mask'.",&tolua_err);
2846  return 0;
2847 #endif
2848 }
2849 #endif //#ifndef TOLUA_DISABLE
2850
2851 /* function: imlib_render_image_on_drawable */
2852 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_render_image_on_drawable00
2853 static int tolua_imlib2_imlib_render_image_on_drawable00(lua_State* tolua_S)
2854 {
2855 #ifndef TOLUA_RELEASE
2856  tolua_Error tolua_err;
2857  if (
2858      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2859      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2860      !tolua_isnoobj(tolua_S,3,&tolua_err)
2861  )
2862   goto tolua_lerror;
2863  else
2864 #endif
2865  {
2866   int x = ((int)  tolua_tonumber(tolua_S,1,0));
2867   int y = ((int)  tolua_tonumber(tolua_S,2,0));
2868   {
2869    imlib_render_image_on_drawable(x,y);
2870   }
2871  }
2872  return 0;
2873 #ifndef TOLUA_RELEASE
2874  tolua_lerror:
2875  tolua_error(tolua_S,"#ferror in function 'imlib_render_image_on_drawable'.",&tolua_err);
2876  return 0;
2877 #endif
2878 }
2879 #endif //#ifndef TOLUA_DISABLE
2880
2881 /* function: imlib_render_image_on_drawable_at_size */
2882 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_render_image_on_drawable_at_size00
2883 static int tolua_imlib2_imlib_render_image_on_drawable_at_size00(lua_State* tolua_S)
2884 {
2885 #ifndef TOLUA_RELEASE
2886  tolua_Error tolua_err;
2887  if (
2888      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2889      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2890      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2891      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2892      !tolua_isnoobj(tolua_S,5,&tolua_err)
2893  )
2894   goto tolua_lerror;
2895  else
2896 #endif
2897  {
2898   int x = ((int)  tolua_tonumber(tolua_S,1,0));
2899   int y = ((int)  tolua_tonumber(tolua_S,2,0));
2900   int width = ((int)  tolua_tonumber(tolua_S,3,0));
2901   int height = ((int)  tolua_tonumber(tolua_S,4,0));
2902   {
2903    imlib_render_image_on_drawable_at_size(x,y,width,height);
2904   }
2905  }
2906  return 0;
2907 #ifndef TOLUA_RELEASE
2908  tolua_lerror:
2909  tolua_error(tolua_S,"#ferror in function 'imlib_render_image_on_drawable_at_size'.",&tolua_err);
2910  return 0;
2911 #endif
2912 }
2913 #endif //#ifndef TOLUA_DISABLE
2914
2915 /* function: imlib_render_image_part_on_drawable_at_size */
2916 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_render_image_part_on_drawable_at_size00
2917 static int tolua_imlib2_imlib_render_image_part_on_drawable_at_size00(lua_State* tolua_S)
2918 {
2919 #ifndef TOLUA_RELEASE
2920  tolua_Error tolua_err;
2921  if (
2922      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
2923      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2924      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2925      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2926      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2927      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
2928      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
2929      !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
2930      !tolua_isnoobj(tolua_S,9,&tolua_err)
2931  )
2932   goto tolua_lerror;
2933  else
2934 #endif
2935  {
2936   int source_x = ((int)  tolua_tonumber(tolua_S,1,0));
2937   int source_y = ((int)  tolua_tonumber(tolua_S,2,0));
2938   int source_width = ((int)  tolua_tonumber(tolua_S,3,0));
2939   int source_height = ((int)  tolua_tonumber(tolua_S,4,0));
2940   int x = ((int)  tolua_tonumber(tolua_S,5,0));
2941   int y = ((int)  tolua_tonumber(tolua_S,6,0));
2942   int width = ((int)  tolua_tonumber(tolua_S,7,0));
2943   int height = ((int)  tolua_tonumber(tolua_S,8,0));
2944   {
2945    imlib_render_image_part_on_drawable_at_size(source_x,source_y,source_width,source_height,x,y,width,height);
2946   }
2947  }
2948  return 0;
2949 #ifndef TOLUA_RELEASE
2950  tolua_lerror:
2951  tolua_error(tolua_S,"#ferror in function 'imlib_render_image_part_on_drawable_at_size'.",&tolua_err);
2952  return 0;
2953 #endif
2954 }
2955 #endif //#ifndef TOLUA_DISABLE
2956
2957 /* function: imlib_render_get_pixel_color */
2958 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_render_get_pixel_color00
2959 static int tolua_imlib2_imlib_render_get_pixel_color00(lua_State* tolua_S)
2960 {
2961 #ifndef TOLUA_RELEASE
2962  tolua_Error tolua_err;
2963  if (
2964      !tolua_isnoobj(tolua_S,1,&tolua_err)
2965  )
2966   goto tolua_lerror;
2967  else
2968 #endif
2969  {
2970   {
2971    unsigned int tolua_ret = (unsigned int)  imlib_render_get_pixel_color();
2972    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2973   }
2974  }
2975  return 1;
2976 #ifndef TOLUA_RELEASE
2977  tolua_lerror:
2978  tolua_error(tolua_S,"#ferror in function 'imlib_render_get_pixel_color'.",&tolua_err);
2979  return 0;
2980 #endif
2981 }
2982 #endif //#ifndef TOLUA_DISABLE
2983
2984 /* function: imlib_blend_image_onto_image */
2985 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_blend_image_onto_image00
2986 static int tolua_imlib2_imlib_blend_image_onto_image00(lua_State* tolua_S)
2987 {
2988 #ifndef TOLUA_RELEASE
2989  tolua_Error tolua_err;
2990  if (
2991      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
2992      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2993      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2994      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2995      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2996      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
2997      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
2998      !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
2999      !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
3000      !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
3001      !tolua_isnoobj(tolua_S,11,&tolua_err)
3002  )
3003   goto tolua_lerror;
3004  else
3005 #endif
3006  {
3007    _userdata source_image = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3008   char merge_alpha = ((char)  tolua_tonumber(tolua_S,2,0));
3009   int source_x = ((int)  tolua_tonumber(tolua_S,3,0));
3010   int source_y = ((int)  tolua_tonumber(tolua_S,4,0));
3011   int source_width = ((int)  tolua_tonumber(tolua_S,5,0));
3012   int source_height = ((int)  tolua_tonumber(tolua_S,6,0));
3013   int destination_x = ((int)  tolua_tonumber(tolua_S,7,0));
3014   int destination_y = ((int)  tolua_tonumber(tolua_S,8,0));
3015   int destination_width = ((int)  tolua_tonumber(tolua_S,9,0));
3016   int destination_height = ((int)  tolua_tonumber(tolua_S,10,0));
3017   {
3018    imlib_blend_image_onto_image(source_image,merge_alpha,source_x,source_y,source_width,source_height,destination_x,destination_y,destination_width,destination_height);
3019   }
3020  }
3021  return 0;
3022 #ifndef TOLUA_RELEASE
3023  tolua_lerror:
3024  tolua_error(tolua_S,"#ferror in function 'imlib_blend_image_onto_image'.",&tolua_err);
3025  return 0;
3026 #endif
3027 }
3028 #endif //#ifndef TOLUA_DISABLE
3029
3030 /* function: imlib_create_image */
3031 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_image00
3032 static int tolua_imlib2_imlib_create_image00(lua_State* tolua_S)
3033 {
3034 #ifndef TOLUA_RELEASE
3035  tolua_Error tolua_err;
3036  if (
3037      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3038      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3039      !tolua_isnoobj(tolua_S,3,&tolua_err)
3040  )
3041   goto tolua_lerror;
3042  else
3043 #endif
3044  {
3045   int width = ((int)  tolua_tonumber(tolua_S,1,0));
3046   int height = ((int)  tolua_tonumber(tolua_S,2,0));
3047   {
3048     _userdata tolua_ret = (  _userdata)  imlib_create_image(width,height);
3049    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3050   }
3051  }
3052  return 1;
3053 #ifndef TOLUA_RELEASE
3054  tolua_lerror:
3055  tolua_error(tolua_S,"#ferror in function 'imlib_create_image'.",&tolua_err);
3056  return 0;
3057 #endif
3058 }
3059 #endif //#ifndef TOLUA_DISABLE
3060
3061 /* function: imlib_create_image_using_data */
3062 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_image_using_data00
3063 static int tolua_imlib2_imlib_create_image_using_data00(lua_State* tolua_S)
3064 {
3065 #ifndef TOLUA_RELEASE
3066  tolua_Error tolua_err;
3067  if (
3068      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3069      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3070      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3071      !tolua_isnoobj(tolua_S,4,&tolua_err)
3072  )
3073   goto tolua_lerror;
3074  else
3075 #endif
3076  {
3077   int width = ((int)  tolua_tonumber(tolua_S,1,0));
3078   int height = ((int)  tolua_tonumber(tolua_S,2,0));
3079   unsigned int data = ((unsigned int)  tolua_tonumber(tolua_S,3,0));
3080   {
3081     _userdata tolua_ret = (  _userdata)  imlib_create_image_using_data(width,height,&data);
3082    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3083    tolua_pushnumber(tolua_S,(lua_Number)data);
3084   }
3085  }
3086  return 2;
3087 #ifndef TOLUA_RELEASE
3088  tolua_lerror:
3089  tolua_error(tolua_S,"#ferror in function 'imlib_create_image_using_data'.",&tolua_err);
3090  return 0;
3091 #endif
3092 }
3093 #endif //#ifndef TOLUA_DISABLE
3094
3095 /* function: imlib_create_image_using_copied_data */
3096 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_image_using_copied_data00
3097 static int tolua_imlib2_imlib_create_image_using_copied_data00(lua_State* tolua_S)
3098 {
3099 #ifndef TOLUA_RELEASE
3100  tolua_Error tolua_err;
3101  if (
3102      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3103      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3104      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3105      !tolua_isnoobj(tolua_S,4,&tolua_err)
3106  )
3107   goto tolua_lerror;
3108  else
3109 #endif
3110  {
3111   int width = ((int)  tolua_tonumber(tolua_S,1,0));
3112   int height = ((int)  tolua_tonumber(tolua_S,2,0));
3113   unsigned int data = ((unsigned int)  tolua_tonumber(tolua_S,3,0));
3114   {
3115     _userdata tolua_ret = (  _userdata)  imlib_create_image_using_copied_data(width,height,&data);
3116    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3117    tolua_pushnumber(tolua_S,(lua_Number)data);
3118   }
3119  }
3120  return 2;
3121 #ifndef TOLUA_RELEASE
3122  tolua_lerror:
3123  tolua_error(tolua_S,"#ferror in function 'imlib_create_image_using_copied_data'.",&tolua_err);
3124  return 0;
3125 #endif
3126 }
3127 #endif //#ifndef TOLUA_DISABLE
3128
3129 /* function: imlib_create_image_from_drawable */
3130 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_image_from_drawable00
3131 static int tolua_imlib2_imlib_create_image_from_drawable00(lua_State* tolua_S)
3132 {
3133 #ifndef TOLUA_RELEASE
3134  tolua_Error tolua_err;
3135  if (
3136      (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"Pixmap",0,&tolua_err)) ||
3137      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3138      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3139      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
3140      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
3141      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
3142      !tolua_isnoobj(tolua_S,7,&tolua_err)
3143  )
3144   goto tolua_lerror;
3145  else
3146 #endif
3147  {
3148   Pixmap mask = *((Pixmap*)  tolua_tousertype(tolua_S,1,0));
3149   int x = ((int)  tolua_tonumber(tolua_S,2,0));
3150   int y = ((int)  tolua_tonumber(tolua_S,3,0));
3151   int width = ((int)  tolua_tonumber(tolua_S,4,0));
3152   int height = ((int)  tolua_tonumber(tolua_S,5,0));
3153   char need_to_grab_x = ((char)  tolua_tonumber(tolua_S,6,0));
3154   {
3155     _userdata tolua_ret = (  _userdata)  imlib_create_image_from_drawable(mask,x,y,width,height,need_to_grab_x);
3156    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3157   }
3158  }
3159  return 1;
3160 #ifndef TOLUA_RELEASE
3161  tolua_lerror:
3162  tolua_error(tolua_S,"#ferror in function 'imlib_create_image_from_drawable'.",&tolua_err);
3163  return 0;
3164 #endif
3165 }
3166 #endif //#ifndef TOLUA_DISABLE
3167
3168 /* function: imlib_create_image_from_ximage */
3169 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_image_from_ximage00
3170 static int tolua_imlib2_imlib_create_image_from_ximage00(lua_State* tolua_S)
3171 {
3172 #ifndef TOLUA_RELEASE
3173  tolua_Error tolua_err;
3174  if (
3175      !tolua_isusertype(tolua_S,1,"XImage",0,&tolua_err) ||
3176      !tolua_isusertype(tolua_S,2,"XImage",0,&tolua_err) ||
3177      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3178      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
3179      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
3180      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
3181      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
3182      !tolua_isnoobj(tolua_S,8,&tolua_err)
3183  )
3184   goto tolua_lerror;
3185  else
3186 #endif
3187  {
3188   XImage* image = ((XImage*)  tolua_tousertype(tolua_S,1,0));
3189   XImage* mask = ((XImage*)  tolua_tousertype(tolua_S,2,0));
3190   int x = ((int)  tolua_tonumber(tolua_S,3,0));
3191   int y = ((int)  tolua_tonumber(tolua_S,4,0));
3192   int width = ((int)  tolua_tonumber(tolua_S,5,0));
3193   int height = ((int)  tolua_tonumber(tolua_S,6,0));
3194   char need_to_grab_x = ((char)  tolua_tonumber(tolua_S,7,0));
3195   {
3196     _userdata tolua_ret = (  _userdata)  imlib_create_image_from_ximage(image,mask,x,y,width,height,need_to_grab_x);
3197    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3198   }
3199  }
3200  return 1;
3201 #ifndef TOLUA_RELEASE
3202  tolua_lerror:
3203  tolua_error(tolua_S,"#ferror in function 'imlib_create_image_from_ximage'.",&tolua_err);
3204  return 0;
3205 #endif
3206 }
3207 #endif //#ifndef TOLUA_DISABLE
3208
3209 /* function: imlib_create_scaled_image_from_drawable */
3210 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_scaled_image_from_drawable00
3211 static int tolua_imlib2_imlib_create_scaled_image_from_drawable00(lua_State* tolua_S)
3212 {
3213 #ifndef TOLUA_RELEASE
3214  tolua_Error tolua_err;
3215  if (
3216      (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"Pixmap",0,&tolua_err)) ||
3217      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3218      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3219      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
3220      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
3221      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
3222      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
3223      !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
3224      !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
3225      !tolua_isnoobj(tolua_S,10,&tolua_err)
3226  )
3227   goto tolua_lerror;
3228  else
3229 #endif
3230  {
3231   Pixmap mask = *((Pixmap*)  tolua_tousertype(tolua_S,1,0));
3232   int source_x = ((int)  tolua_tonumber(tolua_S,2,0));
3233   int source_y = ((int)  tolua_tonumber(tolua_S,3,0));
3234   int source_width = ((int)  tolua_tonumber(tolua_S,4,0));
3235   int source_height = ((int)  tolua_tonumber(tolua_S,5,0));
3236   int destination_width = ((int)  tolua_tonumber(tolua_S,6,0));
3237   int destination_height = ((int)  tolua_tonumber(tolua_S,7,0));
3238   char need_to_grab_x = ((char)  tolua_tonumber(tolua_S,8,0));
3239   char get_mask_from_shape = ((char)  tolua_tonumber(tolua_S,9,0));
3240   {
3241     _userdata tolua_ret = (  _userdata)  imlib_create_scaled_image_from_drawable(mask,source_x,source_y,source_width,source_height,destination_width,destination_height,need_to_grab_x,get_mask_from_shape);
3242    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3243   }
3244  }
3245  return 1;
3246 #ifndef TOLUA_RELEASE
3247  tolua_lerror:
3248  tolua_error(tolua_S,"#ferror in function 'imlib_create_scaled_image_from_drawable'.",&tolua_err);
3249  return 0;
3250 #endif
3251 }
3252 #endif //#ifndef TOLUA_DISABLE
3253
3254 /* function: imlib_copy_drawable_to_image */
3255 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_copy_drawable_to_image00
3256 static int tolua_imlib2_imlib_copy_drawable_to_image00(lua_State* tolua_S)
3257 {
3258 #ifndef TOLUA_RELEASE
3259  tolua_Error tolua_err;
3260  if (
3261      (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"Pixmap",0,&tolua_err)) ||
3262      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3263      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3264      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
3265      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
3266      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
3267      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
3268      !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
3269      !tolua_isnoobj(tolua_S,9,&tolua_err)
3270  )
3271   goto tolua_lerror;
3272  else
3273 #endif
3274  {
3275   Pixmap mask = *((Pixmap*)  tolua_tousertype(tolua_S,1,0));
3276   int x = ((int)  tolua_tonumber(tolua_S,2,0));
3277   int y = ((int)  tolua_tonumber(tolua_S,3,0));
3278   int width = ((int)  tolua_tonumber(tolua_S,4,0));
3279   int height = ((int)  tolua_tonumber(tolua_S,5,0));
3280   int destination_x = ((int)  tolua_tonumber(tolua_S,6,0));
3281   int destination_y = ((int)  tolua_tonumber(tolua_S,7,0));
3282   char need_to_grab_x = ((char)  tolua_tonumber(tolua_S,8,0));
3283   {
3284    char tolua_ret = (char)  imlib_copy_drawable_to_image(mask,x,y,width,height,destination_x,destination_y,need_to_grab_x);
3285    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
3286   }
3287  }
3288  return 1;
3289 #ifndef TOLUA_RELEASE
3290  tolua_lerror:
3291  tolua_error(tolua_S,"#ferror in function 'imlib_copy_drawable_to_image'.",&tolua_err);
3292  return 0;
3293 #endif
3294 }
3295 #endif //#ifndef TOLUA_DISABLE
3296
3297 /* function: imlib_clone_image */
3298 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_clone_image00
3299 static int tolua_imlib2_imlib_clone_image00(lua_State* tolua_S)
3300 {
3301 #ifndef TOLUA_RELEASE
3302  tolua_Error tolua_err;
3303  if (
3304      !tolua_isnoobj(tolua_S,1,&tolua_err)
3305  )
3306   goto tolua_lerror;
3307  else
3308 #endif
3309  {
3310   {
3311     _userdata tolua_ret = (  _userdata)  imlib_clone_image();
3312    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3313   }
3314  }
3315  return 1;
3316 #ifndef TOLUA_RELEASE
3317  tolua_lerror:
3318  tolua_error(tolua_S,"#ferror in function 'imlib_clone_image'.",&tolua_err);
3319  return 0;
3320 #endif
3321 }
3322 #endif //#ifndef TOLUA_DISABLE
3323
3324 /* function: imlib_create_cropped_image */
3325 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_cropped_image00
3326 static int tolua_imlib2_imlib_create_cropped_image00(lua_State* tolua_S)
3327 {
3328 #ifndef TOLUA_RELEASE
3329  tolua_Error tolua_err;
3330  if (
3331      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3332      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3333      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3334      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
3335      !tolua_isnoobj(tolua_S,5,&tolua_err)
3336  )
3337   goto tolua_lerror;
3338  else
3339 #endif
3340  {
3341   int x = ((int)  tolua_tonumber(tolua_S,1,0));
3342   int y = ((int)  tolua_tonumber(tolua_S,2,0));
3343   int width = ((int)  tolua_tonumber(tolua_S,3,0));
3344   int height = ((int)  tolua_tonumber(tolua_S,4,0));
3345   {
3346     _userdata tolua_ret = (  _userdata)  imlib_create_cropped_image(x,y,width,height);
3347    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3348   }
3349  }
3350  return 1;
3351 #ifndef TOLUA_RELEASE
3352  tolua_lerror:
3353  tolua_error(tolua_S,"#ferror in function 'imlib_create_cropped_image'.",&tolua_err);
3354  return 0;
3355 #endif
3356 }
3357 #endif //#ifndef TOLUA_DISABLE
3358
3359 /* function: imlib_create_cropped_scaled_image */
3360 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_cropped_scaled_image00
3361 static int tolua_imlib2_imlib_create_cropped_scaled_image00(lua_State* tolua_S)
3362 {
3363 #ifndef TOLUA_RELEASE
3364  tolua_Error tolua_err;
3365  if (
3366      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3367      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3368      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3369      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
3370      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
3371      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
3372      !tolua_isnoobj(tolua_S,7,&tolua_err)
3373  )
3374   goto tolua_lerror;
3375  else
3376 #endif
3377  {
3378   int source_x = ((int)  tolua_tonumber(tolua_S,1,0));
3379   int source_y = ((int)  tolua_tonumber(tolua_S,2,0));
3380   int source_width = ((int)  tolua_tonumber(tolua_S,3,0));
3381   int source_height = ((int)  tolua_tonumber(tolua_S,4,0));
3382   int destination_width = ((int)  tolua_tonumber(tolua_S,5,0));
3383   int destination_height = ((int)  tolua_tonumber(tolua_S,6,0));
3384   {
3385     _userdata tolua_ret = (  _userdata)  imlib_create_cropped_scaled_image(source_x,source_y,source_width,source_height,destination_width,destination_height);
3386    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3387   }
3388  }
3389  return 1;
3390 #ifndef TOLUA_RELEASE
3391  tolua_lerror:
3392  tolua_error(tolua_S,"#ferror in function 'imlib_create_cropped_scaled_image'.",&tolua_err);
3393  return 0;
3394 #endif
3395 }
3396 #endif //#ifndef TOLUA_DISABLE
3397
3398 /* function: imlib_updates_clone */
3399 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_updates_clone00
3400 static int tolua_imlib2_imlib_updates_clone00(lua_State* tolua_S)
3401 {
3402 #ifndef TOLUA_RELEASE
3403  tolua_Error tolua_err;
3404  if (
3405      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
3406      !tolua_isnoobj(tolua_S,2,&tolua_err)
3407  )
3408   goto tolua_lerror;
3409  else
3410 #endif
3411  {
3412    _userdata updates = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3413   {
3414     _userdata tolua_ret = (  _userdata)  imlib_updates_clone(updates);
3415    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3416   }
3417  }
3418  return 1;
3419 #ifndef TOLUA_RELEASE
3420  tolua_lerror:
3421  tolua_error(tolua_S,"#ferror in function 'imlib_updates_clone'.",&tolua_err);
3422  return 0;
3423 #endif
3424 }
3425 #endif //#ifndef TOLUA_DISABLE
3426
3427 /* function: imlib_update_append_rect */
3428 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_update_append_rect00
3429 static int tolua_imlib2_imlib_update_append_rect00(lua_State* tolua_S)
3430 {
3431 #ifndef TOLUA_RELEASE
3432  tolua_Error tolua_err;
3433  if (
3434      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
3435      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3436      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3437      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
3438      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
3439      !tolua_isnoobj(tolua_S,6,&tolua_err)
3440  )
3441   goto tolua_lerror;
3442  else
3443 #endif
3444  {
3445    _userdata updates = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3446   int x = ((int)  tolua_tonumber(tolua_S,2,0));
3447   int y = ((int)  tolua_tonumber(tolua_S,3,0));
3448   int w = ((int)  tolua_tonumber(tolua_S,4,0));
3449   int h = ((int)  tolua_tonumber(tolua_S,5,0));
3450   {
3451     _userdata tolua_ret = (  _userdata)  imlib_update_append_rect(updates,x,y,w,h);
3452    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3453   }
3454  }
3455  return 1;
3456 #ifndef TOLUA_RELEASE
3457  tolua_lerror:
3458  tolua_error(tolua_S,"#ferror in function 'imlib_update_append_rect'.",&tolua_err);
3459  return 0;
3460 #endif
3461 }
3462 #endif //#ifndef TOLUA_DISABLE
3463
3464 /* function: imlib_updates_merge */
3465 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_updates_merge00
3466 static int tolua_imlib2_imlib_updates_merge00(lua_State* tolua_S)
3467 {
3468 #ifndef TOLUA_RELEASE
3469  tolua_Error tolua_err;
3470  if (
3471      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
3472      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3473      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3474      !tolua_isnoobj(tolua_S,4,&tolua_err)
3475  )
3476   goto tolua_lerror;
3477  else
3478 #endif
3479  {
3480    _userdata updates = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3481   int w = ((int)  tolua_tonumber(tolua_S,2,0));
3482   int h = ((int)  tolua_tonumber(tolua_S,3,0));
3483   {
3484     _userdata tolua_ret = (  _userdata)  imlib_updates_merge(updates,w,h);
3485    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3486   }
3487  }
3488  return 1;
3489 #ifndef TOLUA_RELEASE
3490  tolua_lerror:
3491  tolua_error(tolua_S,"#ferror in function 'imlib_updates_merge'.",&tolua_err);
3492  return 0;
3493 #endif
3494 }
3495 #endif //#ifndef TOLUA_DISABLE
3496
3497 /* function: imlib_updates_merge_for_rendering */
3498 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_updates_merge_for_rendering00
3499 static int tolua_imlib2_imlib_updates_merge_for_rendering00(lua_State* tolua_S)
3500 {
3501 #ifndef TOLUA_RELEASE
3502  tolua_Error tolua_err;
3503  if (
3504      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
3505      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3506      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3507      !tolua_isnoobj(tolua_S,4,&tolua_err)
3508  )
3509   goto tolua_lerror;
3510  else
3511 #endif
3512  {
3513    _userdata updates = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3514   int w = ((int)  tolua_tonumber(tolua_S,2,0));
3515   int h = ((int)  tolua_tonumber(tolua_S,3,0));
3516   {
3517     _userdata tolua_ret = (  _userdata)  imlib_updates_merge_for_rendering(updates,w,h);
3518    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3519   }
3520  }
3521  return 1;
3522 #ifndef TOLUA_RELEASE
3523  tolua_lerror:
3524  tolua_error(tolua_S,"#ferror in function 'imlib_updates_merge_for_rendering'.",&tolua_err);
3525  return 0;
3526 #endif
3527 }
3528 #endif //#ifndef TOLUA_DISABLE
3529
3530 /* function: imlib_updates_free */
3531 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_updates_free00
3532 static int tolua_imlib2_imlib_updates_free00(lua_State* tolua_S)
3533 {
3534 #ifndef TOLUA_RELEASE
3535  tolua_Error tolua_err;
3536  if (
3537      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
3538      !tolua_isnoobj(tolua_S,2,&tolua_err)
3539  )
3540   goto tolua_lerror;
3541  else
3542 #endif
3543  {
3544    _userdata updates = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3545   {
3546    imlib_updates_free(updates);
3547   }
3548  }
3549  return 0;
3550 #ifndef TOLUA_RELEASE
3551  tolua_lerror:
3552  tolua_error(tolua_S,"#ferror in function 'imlib_updates_free'.",&tolua_err);
3553  return 0;
3554 #endif
3555 }
3556 #endif //#ifndef TOLUA_DISABLE
3557
3558 /* function: imlib_updates_get_next */
3559 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_updates_get_next00
3560 static int tolua_imlib2_imlib_updates_get_next00(lua_State* tolua_S)
3561 {
3562 #ifndef TOLUA_RELEASE
3563  tolua_Error tolua_err;
3564  if (
3565      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
3566      !tolua_isnoobj(tolua_S,2,&tolua_err)
3567  )
3568   goto tolua_lerror;
3569  else
3570 #endif
3571  {
3572    _userdata updates = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3573   {
3574     _userdata tolua_ret = (  _userdata)  imlib_updates_get_next(updates);
3575    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3576   }
3577  }
3578  return 1;
3579 #ifndef TOLUA_RELEASE
3580  tolua_lerror:
3581  tolua_error(tolua_S,"#ferror in function 'imlib_updates_get_next'.",&tolua_err);
3582  return 0;
3583 #endif
3584 }
3585 #endif //#ifndef TOLUA_DISABLE
3586
3587 /* function: imlib_updates_get_coordinates */
3588 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_updates_get_coordinates00
3589 static int tolua_imlib2_imlib_updates_get_coordinates00(lua_State* tolua_S)
3590 {
3591 #ifndef TOLUA_RELEASE
3592  tolua_Error tolua_err;
3593  if (
3594      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
3595      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3596      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3597      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
3598      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
3599      !tolua_isnoobj(tolua_S,6,&tolua_err)
3600  )
3601   goto tolua_lerror;
3602  else
3603 #endif
3604  {
3605    _userdata updates = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3606   int x_return = ((int)  tolua_tonumber(tolua_S,2,0));
3607   int y_return = ((int)  tolua_tonumber(tolua_S,3,0));
3608   int width_return = ((int)  tolua_tonumber(tolua_S,4,0));
3609   int height_return = ((int)  tolua_tonumber(tolua_S,5,0));
3610   {
3611    imlib_updates_get_coordinates(updates,&x_return,&y_return,&width_return,&height_return);
3612    tolua_pushnumber(tolua_S,(lua_Number)x_return);
3613    tolua_pushnumber(tolua_S,(lua_Number)y_return);
3614    tolua_pushnumber(tolua_S,(lua_Number)width_return);
3615    tolua_pushnumber(tolua_S,(lua_Number)height_return);
3616   }
3617  }
3618  return 4;
3619 #ifndef TOLUA_RELEASE
3620  tolua_lerror:
3621  tolua_error(tolua_S,"#ferror in function 'imlib_updates_get_coordinates'.",&tolua_err);
3622  return 0;
3623 #endif
3624 }
3625 #endif //#ifndef TOLUA_DISABLE
3626
3627 /* function: imlib_updates_set_coordinates */
3628 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_updates_set_coordinates00
3629 static int tolua_imlib2_imlib_updates_set_coordinates00(lua_State* tolua_S)
3630 {
3631 #ifndef TOLUA_RELEASE
3632  tolua_Error tolua_err;
3633  if (
3634      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
3635      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3636      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3637      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
3638      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
3639      !tolua_isnoobj(tolua_S,6,&tolua_err)
3640  )
3641   goto tolua_lerror;
3642  else
3643 #endif
3644  {
3645    _userdata updates = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3646   int x = ((int)  tolua_tonumber(tolua_S,2,0));
3647   int y = ((int)  tolua_tonumber(tolua_S,3,0));
3648   int width = ((int)  tolua_tonumber(tolua_S,4,0));
3649   int height = ((int)  tolua_tonumber(tolua_S,5,0));
3650   {
3651    imlib_updates_set_coordinates(updates,x,y,width,height);
3652   }
3653  }
3654  return 0;
3655 #ifndef TOLUA_RELEASE
3656  tolua_lerror:
3657  tolua_error(tolua_S,"#ferror in function 'imlib_updates_set_coordinates'.",&tolua_err);
3658  return 0;
3659 #endif
3660 }
3661 #endif //#ifndef TOLUA_DISABLE
3662
3663 /* function: imlib_render_image_updates_on_drawable */
3664 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_render_image_updates_on_drawable00
3665 static int tolua_imlib2_imlib_render_image_updates_on_drawable00(lua_State* tolua_S)
3666 {
3667 #ifndef TOLUA_RELEASE
3668  tolua_Error tolua_err;
3669  if (
3670      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
3671      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3672      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
3673      !tolua_isnoobj(tolua_S,4,&tolua_err)
3674  )
3675   goto tolua_lerror;
3676  else
3677 #endif
3678  {
3679    _userdata updates = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3680   int x = ((int)  tolua_tonumber(tolua_S,2,0));
3681   int y = ((int)  tolua_tonumber(tolua_S,3,0));
3682   {
3683    imlib_render_image_updates_on_drawable(updates,x,y);
3684   }
3685  }
3686  return 0;
3687 #ifndef TOLUA_RELEASE
3688  tolua_lerror:
3689  tolua_error(tolua_S,"#ferror in function 'imlib_render_image_updates_on_drawable'.",&tolua_err);
3690  return 0;
3691 #endif
3692 }
3693 #endif //#ifndef TOLUA_DISABLE
3694
3695 /* function: imlib_updates_init */
3696 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_updates_init00
3697 static int tolua_imlib2_imlib_updates_init00(lua_State* tolua_S)
3698 {
3699 #ifndef TOLUA_RELEASE
3700  tolua_Error tolua_err;
3701  if (
3702      !tolua_isnoobj(tolua_S,1,&tolua_err)
3703  )
3704   goto tolua_lerror;
3705  else
3706 #endif
3707  {
3708   {
3709     _userdata tolua_ret = (  _userdata)  imlib_updates_init();
3710    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3711   }
3712  }
3713  return 1;
3714 #ifndef TOLUA_RELEASE
3715  tolua_lerror:
3716  tolua_error(tolua_S,"#ferror in function 'imlib_updates_init'.",&tolua_err);
3717  return 0;
3718 #endif
3719 }
3720 #endif //#ifndef TOLUA_DISABLE
3721
3722 /* function: imlib_updates_append_updates */
3723 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_updates_append_updates00
3724 static int tolua_imlib2_imlib_updates_append_updates00(lua_State* tolua_S)
3725 {
3726 #ifndef TOLUA_RELEASE
3727  tolua_Error tolua_err;
3728  if (
3729      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
3730      !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
3731      !tolua_isnoobj(tolua_S,3,&tolua_err)
3732  )
3733   goto tolua_lerror;
3734  else
3735 #endif
3736  {
3737    _userdata updates = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
3738    _userdata appended_updates = ((  _userdata)  tolua_touserdata(tolua_S,2,0));
3739   {
3740     _userdata tolua_ret = (  _userdata)  imlib_updates_append_updates(updates,appended_updates);
3741    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
3742   }
3743  }
3744  return 1;
3745 #ifndef TOLUA_RELEASE
3746  tolua_lerror:
3747  tolua_error(tolua_S,"#ferror in function 'imlib_updates_append_updates'.",&tolua_err);
3748  return 0;
3749 #endif
3750 }
3751 #endif //#ifndef TOLUA_DISABLE
3752
3753 /* function: imlib_image_flip_horizontal */
3754 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_flip_horizontal00
3755 static int tolua_imlib2_imlib_image_flip_horizontal00(lua_State* tolua_S)
3756 {
3757 #ifndef TOLUA_RELEASE
3758  tolua_Error tolua_err;
3759  if (
3760      !tolua_isnoobj(tolua_S,1,&tolua_err)
3761  )
3762   goto tolua_lerror;
3763  else
3764 #endif
3765  {
3766   {
3767    imlib_image_flip_horizontal();
3768   }
3769  }
3770  return 0;
3771 #ifndef TOLUA_RELEASE
3772  tolua_lerror:
3773  tolua_error(tolua_S,"#ferror in function 'imlib_image_flip_horizontal'.",&tolua_err);
3774  return 0;
3775 #endif
3776 }
3777 #endif //#ifndef TOLUA_DISABLE
3778
3779 /* function: imlib_image_flip_vertical */
3780 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_flip_vertical00
3781 static int tolua_imlib2_imlib_image_flip_vertical00(lua_State* tolua_S)
3782 {
3783 #ifndef TOLUA_RELEASE
3784  tolua_Error tolua_err;
3785  if (
3786      !tolua_isnoobj(tolua_S,1,&tolua_err)
3787  )
3788   goto tolua_lerror;
3789  else
3790 #endif
3791  {
3792   {
3793    imlib_image_flip_vertical();
3794   }
3795  }
3796  return 0;
3797 #ifndef TOLUA_RELEASE
3798  tolua_lerror:
3799  tolua_error(tolua_S,"#ferror in function 'imlib_image_flip_vertical'.",&tolua_err);
3800  return 0;
3801 #endif
3802 }
3803 #endif //#ifndef TOLUA_DISABLE
3804
3805 /* function: imlib_image_flip_diagonal */
3806 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_flip_diagonal00
3807 static int tolua_imlib2_imlib_image_flip_diagonal00(lua_State* tolua_S)
3808 {
3809 #ifndef TOLUA_RELEASE
3810  tolua_Error tolua_err;
3811  if (
3812      !tolua_isnoobj(tolua_S,1,&tolua_err)
3813  )
3814   goto tolua_lerror;
3815  else
3816 #endif
3817  {
3818   {
3819    imlib_image_flip_diagonal();
3820   }
3821  }
3822  return 0;
3823 #ifndef TOLUA_RELEASE
3824  tolua_lerror:
3825  tolua_error(tolua_S,"#ferror in function 'imlib_image_flip_diagonal'.",&tolua_err);
3826  return 0;
3827 #endif
3828 }
3829 #endif //#ifndef TOLUA_DISABLE
3830
3831 /* function: imlib_image_orientate */
3832 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_orientate00
3833 static int tolua_imlib2_imlib_image_orientate00(lua_State* tolua_S)
3834 {
3835 #ifndef TOLUA_RELEASE
3836  tolua_Error tolua_err;
3837  if (
3838      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3839      !tolua_isnoobj(tolua_S,2,&tolua_err)
3840  )
3841   goto tolua_lerror;
3842  else
3843 #endif
3844  {
3845   int orientation = ((int)  tolua_tonumber(tolua_S,1,0));
3846   {
3847    imlib_image_orientate(orientation);
3848   }
3849  }
3850  return 0;
3851 #ifndef TOLUA_RELEASE
3852  tolua_lerror:
3853  tolua_error(tolua_S,"#ferror in function 'imlib_image_orientate'.",&tolua_err);
3854  return 0;
3855 #endif
3856 }
3857 #endif //#ifndef TOLUA_DISABLE
3858
3859 /* function: imlib_image_blur */
3860 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_blur00
3861 static int tolua_imlib2_imlib_image_blur00(lua_State* tolua_S)
3862 {
3863 #ifndef TOLUA_RELEASE
3864  tolua_Error tolua_err;
3865  if (
3866      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3867      !tolua_isnoobj(tolua_S,2,&tolua_err)
3868  )
3869   goto tolua_lerror;
3870  else
3871 #endif
3872  {
3873   int radius = ((int)  tolua_tonumber(tolua_S,1,0));
3874   {
3875    imlib_image_blur(radius);
3876   }
3877  }
3878  return 0;
3879 #ifndef TOLUA_RELEASE
3880  tolua_lerror:
3881  tolua_error(tolua_S,"#ferror in function 'imlib_image_blur'.",&tolua_err);
3882  return 0;
3883 #endif
3884 }
3885 #endif //#ifndef TOLUA_DISABLE
3886
3887 /* function: imlib_image_sharpen */
3888 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_sharpen00
3889 static int tolua_imlib2_imlib_image_sharpen00(lua_State* tolua_S)
3890 {
3891 #ifndef TOLUA_RELEASE
3892  tolua_Error tolua_err;
3893  if (
3894      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3895      !tolua_isnoobj(tolua_S,2,&tolua_err)
3896  )
3897   goto tolua_lerror;
3898  else
3899 #endif
3900  {
3901   int radius = ((int)  tolua_tonumber(tolua_S,1,0));
3902   {
3903    imlib_image_sharpen(radius);
3904   }
3905  }
3906  return 0;
3907 #ifndef TOLUA_RELEASE
3908  tolua_lerror:
3909  tolua_error(tolua_S,"#ferror in function 'imlib_image_sharpen'.",&tolua_err);
3910  return 0;
3911 #endif
3912 }
3913 #endif //#ifndef TOLUA_DISABLE
3914
3915 /* function: imlib_image_tile_horizontal */
3916 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_tile_horizontal00
3917 static int tolua_imlib2_imlib_image_tile_horizontal00(lua_State* tolua_S)
3918 {
3919 #ifndef TOLUA_RELEASE
3920  tolua_Error tolua_err;
3921  if (
3922      !tolua_isnoobj(tolua_S,1,&tolua_err)
3923  )
3924   goto tolua_lerror;
3925  else
3926 #endif
3927  {
3928   {
3929    imlib_image_tile_horizontal();
3930   }
3931  }
3932  return 0;
3933 #ifndef TOLUA_RELEASE
3934  tolua_lerror:
3935  tolua_error(tolua_S,"#ferror in function 'imlib_image_tile_horizontal'.",&tolua_err);
3936  return 0;
3937 #endif
3938 }
3939 #endif //#ifndef TOLUA_DISABLE
3940
3941 /* function: imlib_image_tile_vertical */
3942 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_tile_vertical00
3943 static int tolua_imlib2_imlib_image_tile_vertical00(lua_State* tolua_S)
3944 {
3945 #ifndef TOLUA_RELEASE
3946  tolua_Error tolua_err;
3947  if (
3948      !tolua_isnoobj(tolua_S,1,&tolua_err)
3949  )
3950   goto tolua_lerror;
3951  else
3952 #endif
3953  {
3954   {
3955    imlib_image_tile_vertical();
3956   }
3957  }
3958  return 0;
3959 #ifndef TOLUA_RELEASE
3960  tolua_lerror:
3961  tolua_error(tolua_S,"#ferror in function 'imlib_image_tile_vertical'.",&tolua_err);
3962  return 0;
3963 #endif
3964 }
3965 #endif //#ifndef TOLUA_DISABLE
3966
3967 /* function: imlib_image_tile */
3968 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_tile00
3969 static int tolua_imlib2_imlib_image_tile00(lua_State* tolua_S)
3970 {
3971 #ifndef TOLUA_RELEASE
3972  tolua_Error tolua_err;
3973  if (
3974      !tolua_isnoobj(tolua_S,1,&tolua_err)
3975  )
3976   goto tolua_lerror;
3977  else
3978 #endif
3979  {
3980   {
3981    imlib_image_tile();
3982   }
3983  }
3984  return 0;
3985 #ifndef TOLUA_RELEASE
3986  tolua_lerror:
3987  tolua_error(tolua_S,"#ferror in function 'imlib_image_tile'.",&tolua_err);
3988  return 0;
3989 #endif
3990 }
3991 #endif //#ifndef TOLUA_DISABLE
3992
3993 /* function: imlib_load_font */
3994 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_load_font00
3995 static int tolua_imlib2_imlib_load_font00(lua_State* tolua_S)
3996 {
3997 #ifndef TOLUA_RELEASE
3998  tolua_Error tolua_err;
3999  if (
4000      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4001      !tolua_isnoobj(tolua_S,2,&tolua_err)
4002  )
4003   goto tolua_lerror;
4004  else
4005 #endif
4006  {
4007   const char* font_name = ((const char*)  tolua_tostring(tolua_S,1,0));
4008   {
4009     _userdata tolua_ret = (  _userdata)  imlib_load_font(font_name);
4010    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
4011   }
4012  }
4013  return 1;
4014 #ifndef TOLUA_RELEASE
4015  tolua_lerror:
4016  tolua_error(tolua_S,"#ferror in function 'imlib_load_font'.",&tolua_err);
4017  return 0;
4018 #endif
4019 }
4020 #endif //#ifndef TOLUA_DISABLE
4021
4022 /* function: imlib_free_font */
4023 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_free_font00
4024 static int tolua_imlib2_imlib_free_font00(lua_State* tolua_S)
4025 {
4026 #ifndef TOLUA_RELEASE
4027  tolua_Error tolua_err;
4028  if (
4029      !tolua_isnoobj(tolua_S,1,&tolua_err)
4030  )
4031   goto tolua_lerror;
4032  else
4033 #endif
4034  {
4035   {
4036    imlib_free_font();
4037   }
4038  }
4039  return 0;
4040 #ifndef TOLUA_RELEASE
4041  tolua_lerror:
4042  tolua_error(tolua_S,"#ferror in function 'imlib_free_font'.",&tolua_err);
4043  return 0;
4044 #endif
4045 }
4046 #endif //#ifndef TOLUA_DISABLE
4047
4048 /* function: imlib_insert_font_into_fallback_chain */
4049 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_insert_font_into_fallback_chain00
4050 static int tolua_imlib2_imlib_insert_font_into_fallback_chain00(lua_State* tolua_S)
4051 {
4052 #ifndef TOLUA_RELEASE
4053  tolua_Error tolua_err;
4054  if (
4055      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
4056      !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
4057      !tolua_isnoobj(tolua_S,3,&tolua_err)
4058  )
4059   goto tolua_lerror;
4060  else
4061 #endif
4062  {
4063    _userdata font = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
4064    _userdata fallback_font = ((  _userdata)  tolua_touserdata(tolua_S,2,0));
4065   {
4066    int tolua_ret = (int)  imlib_insert_font_into_fallback_chain(font,fallback_font);
4067    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4068   }
4069  }
4070  return 1;
4071 #ifndef TOLUA_RELEASE
4072  tolua_lerror:
4073  tolua_error(tolua_S,"#ferror in function 'imlib_insert_font_into_fallback_chain'.",&tolua_err);
4074  return 0;
4075 #endif
4076 }
4077 #endif //#ifndef TOLUA_DISABLE
4078
4079 /* function: imlib_remove_font_from_fallback_chain */
4080 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_remove_font_from_fallback_chain00
4081 static int tolua_imlib2_imlib_remove_font_from_fallback_chain00(lua_State* tolua_S)
4082 {
4083 #ifndef TOLUA_RELEASE
4084  tolua_Error tolua_err;
4085  if (
4086      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
4087      !tolua_isnoobj(tolua_S,2,&tolua_err)
4088  )
4089   goto tolua_lerror;
4090  else
4091 #endif
4092  {
4093    _userdata fallback_font = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
4094   {
4095    imlib_remove_font_from_fallback_chain(fallback_font);
4096   }
4097  }
4098  return 0;
4099 #ifndef TOLUA_RELEASE
4100  tolua_lerror:
4101  tolua_error(tolua_S,"#ferror in function 'imlib_remove_font_from_fallback_chain'.",&tolua_err);
4102  return 0;
4103 #endif
4104 }
4105 #endif //#ifndef TOLUA_DISABLE
4106
4107 /* function: imlib_get_prev_font_in_fallback_chain */
4108 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_prev_font_in_fallback_chain00
4109 static int tolua_imlib2_imlib_get_prev_font_in_fallback_chain00(lua_State* tolua_S)
4110 {
4111 #ifndef TOLUA_RELEASE
4112  tolua_Error tolua_err;
4113  if (
4114      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
4115      !tolua_isnoobj(tolua_S,2,&tolua_err)
4116  )
4117   goto tolua_lerror;
4118  else
4119 #endif
4120  {
4121    _userdata fn = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
4122   {
4123     _userdata tolua_ret = (  _userdata)  imlib_get_prev_font_in_fallback_chain(fn);
4124    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
4125   }
4126  }
4127  return 1;
4128 #ifndef TOLUA_RELEASE
4129  tolua_lerror:
4130  tolua_error(tolua_S,"#ferror in function 'imlib_get_prev_font_in_fallback_chain'.",&tolua_err);
4131  return 0;
4132 #endif
4133 }
4134 #endif //#ifndef TOLUA_DISABLE
4135
4136 /* function: imlib_get_next_font_in_fallback_chain */
4137 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_next_font_in_fallback_chain00
4138 static int tolua_imlib2_imlib_get_next_font_in_fallback_chain00(lua_State* tolua_S)
4139 {
4140 #ifndef TOLUA_RELEASE
4141  tolua_Error tolua_err;
4142  if (
4143      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
4144      !tolua_isnoobj(tolua_S,2,&tolua_err)
4145  )
4146   goto tolua_lerror;
4147  else
4148 #endif
4149  {
4150    _userdata fn = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
4151   {
4152     _userdata tolua_ret = (  _userdata)  imlib_get_next_font_in_fallback_chain(fn);
4153    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
4154   }
4155  }
4156  return 1;
4157 #ifndef TOLUA_RELEASE
4158  tolua_lerror:
4159  tolua_error(tolua_S,"#ferror in function 'imlib_get_next_font_in_fallback_chain'.",&tolua_err);
4160  return 0;
4161 #endif
4162 }
4163 #endif //#ifndef TOLUA_DISABLE
4164
4165 /* function: imlib_text_draw */
4166 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_text_draw00
4167 static int tolua_imlib2_imlib_text_draw00(lua_State* tolua_S)
4168 {
4169 #ifndef TOLUA_RELEASE
4170  tolua_Error tolua_err;
4171  if (
4172      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4173      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4174      !tolua_isstring(tolua_S,3,0,&tolua_err) ||
4175      !tolua_isnoobj(tolua_S,4,&tolua_err)
4176  )
4177   goto tolua_lerror;
4178  else
4179 #endif
4180  {
4181   int x = ((int)  tolua_tonumber(tolua_S,1,0));
4182   int y = ((int)  tolua_tonumber(tolua_S,2,0));
4183   const char* text = ((const char*)  tolua_tostring(tolua_S,3,0));
4184   {
4185    imlib_text_draw(x,y,text);
4186   }
4187  }
4188  return 0;
4189 #ifndef TOLUA_RELEASE
4190  tolua_lerror:
4191  tolua_error(tolua_S,"#ferror in function 'imlib_text_draw'.",&tolua_err);
4192  return 0;
4193 #endif
4194 }
4195 #endif //#ifndef TOLUA_DISABLE
4196
4197 /* function: imlib_text_draw_with_return_metrics */
4198 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_text_draw_with_return_metrics00
4199 static int tolua_imlib2_imlib_text_draw_with_return_metrics00(lua_State* tolua_S)
4200 {
4201 #ifndef TOLUA_RELEASE
4202  tolua_Error tolua_err;
4203  if (
4204      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4205      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4206      !tolua_isstring(tolua_S,3,0,&tolua_err) ||
4207      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
4208      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
4209      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
4210      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
4211      !tolua_isnoobj(tolua_S,8,&tolua_err)
4212  )
4213   goto tolua_lerror;
4214  else
4215 #endif
4216  {
4217   int x = ((int)  tolua_tonumber(tolua_S,1,0));
4218   int y = ((int)  tolua_tonumber(tolua_S,2,0));
4219   const char* text = ((const char*)  tolua_tostring(tolua_S,3,0));
4220   int width_return = ((int)  tolua_tonumber(tolua_S,4,0));
4221   int height_return = ((int)  tolua_tonumber(tolua_S,5,0));
4222   int horizontal_advance_return = ((int)  tolua_tonumber(tolua_S,6,0));
4223   int vertical_advance_return = ((int)  tolua_tonumber(tolua_S,7,0));
4224   {
4225    imlib_text_draw_with_return_metrics(x,y,text,&width_return,&height_return,&horizontal_advance_return,&vertical_advance_return);
4226    tolua_pushnumber(tolua_S,(lua_Number)width_return);
4227    tolua_pushnumber(tolua_S,(lua_Number)height_return);
4228    tolua_pushnumber(tolua_S,(lua_Number)horizontal_advance_return);
4229    tolua_pushnumber(tolua_S,(lua_Number)vertical_advance_return);
4230   }
4231  }
4232  return 4;
4233 #ifndef TOLUA_RELEASE
4234  tolua_lerror:
4235  tolua_error(tolua_S,"#ferror in function 'imlib_text_draw_with_return_metrics'.",&tolua_err);
4236  return 0;
4237 #endif
4238 }
4239 #endif //#ifndef TOLUA_DISABLE
4240
4241 /* function: imlib_get_text_size */
4242 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_text_size00
4243 static int tolua_imlib2_imlib_get_text_size00(lua_State* tolua_S)
4244 {
4245 #ifndef TOLUA_RELEASE
4246  tolua_Error tolua_err;
4247  if (
4248      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4249      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4250      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
4251      !tolua_isnoobj(tolua_S,4,&tolua_err)
4252  )
4253   goto tolua_lerror;
4254  else
4255 #endif
4256  {
4257   const char* text = ((const char*)  tolua_tostring(tolua_S,1,0));
4258   int width_return = ((int)  tolua_tonumber(tolua_S,2,0));
4259   int height_return = ((int)  tolua_tonumber(tolua_S,3,0));
4260   {
4261    imlib_get_text_size(text,&width_return,&height_return);
4262    tolua_pushnumber(tolua_S,(lua_Number)width_return);
4263    tolua_pushnumber(tolua_S,(lua_Number)height_return);
4264   }
4265  }
4266  return 2;
4267 #ifndef TOLUA_RELEASE
4268  tolua_lerror:
4269  tolua_error(tolua_S,"#ferror in function 'imlib_get_text_size'.",&tolua_err);
4270  return 0;
4271 #endif
4272 }
4273 #endif //#ifndef TOLUA_DISABLE
4274
4275 /* function: imlib_get_text_advance */
4276 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_text_advance00
4277 static int tolua_imlib2_imlib_get_text_advance00(lua_State* tolua_S)
4278 {
4279 #ifndef TOLUA_RELEASE
4280  tolua_Error tolua_err;
4281  if (
4282      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4283      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4284      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
4285      !tolua_isnoobj(tolua_S,4,&tolua_err)
4286  )
4287   goto tolua_lerror;
4288  else
4289 #endif
4290  {
4291   const char* text = ((const char*)  tolua_tostring(tolua_S,1,0));
4292   int horizontal_advance_return = ((int)  tolua_tonumber(tolua_S,2,0));
4293   int vertical_advance_return = ((int)  tolua_tonumber(tolua_S,3,0));
4294   {
4295    imlib_get_text_advance(text,&horizontal_advance_return,&vertical_advance_return);
4296    tolua_pushnumber(tolua_S,(lua_Number)horizontal_advance_return);
4297    tolua_pushnumber(tolua_S,(lua_Number)vertical_advance_return);
4298   }
4299  }
4300  return 2;
4301 #ifndef TOLUA_RELEASE
4302  tolua_lerror:
4303  tolua_error(tolua_S,"#ferror in function 'imlib_get_text_advance'.",&tolua_err);
4304  return 0;
4305 #endif
4306 }
4307 #endif //#ifndef TOLUA_DISABLE
4308
4309 /* function: imlib_get_text_inset */
4310 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_text_inset00
4311 static int tolua_imlib2_imlib_get_text_inset00(lua_State* tolua_S)
4312 {
4313 #ifndef TOLUA_RELEASE
4314  tolua_Error tolua_err;
4315  if (
4316      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4317      !tolua_isnoobj(tolua_S,2,&tolua_err)
4318  )
4319   goto tolua_lerror;
4320  else
4321 #endif
4322  {
4323   const char* text = ((const char*)  tolua_tostring(tolua_S,1,0));
4324   {
4325    int tolua_ret = (int)  imlib_get_text_inset(text);
4326    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4327   }
4328  }
4329  return 1;
4330 #ifndef TOLUA_RELEASE
4331  tolua_lerror:
4332  tolua_error(tolua_S,"#ferror in function 'imlib_get_text_inset'.",&tolua_err);
4333  return 0;
4334 #endif
4335 }
4336 #endif //#ifndef TOLUA_DISABLE
4337
4338 /* function: imlib_add_path_to_font_path */
4339 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_add_path_to_font_path00
4340 static int tolua_imlib2_imlib_add_path_to_font_path00(lua_State* tolua_S)
4341 {
4342 #ifndef TOLUA_RELEASE
4343  tolua_Error tolua_err;
4344  if (
4345      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4346      !tolua_isnoobj(tolua_S,2,&tolua_err)
4347  )
4348   goto tolua_lerror;
4349  else
4350 #endif
4351  {
4352   const char* path = ((const char*)  tolua_tostring(tolua_S,1,0));
4353   {
4354    imlib_add_path_to_font_path(path);
4355   }
4356  }
4357  return 0;
4358 #ifndef TOLUA_RELEASE
4359  tolua_lerror:
4360  tolua_error(tolua_S,"#ferror in function 'imlib_add_path_to_font_path'.",&tolua_err);
4361  return 0;
4362 #endif
4363 }
4364 #endif //#ifndef TOLUA_DISABLE
4365
4366 /* function: imlib_remove_path_from_font_path */
4367 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_remove_path_from_font_path00
4368 static int tolua_imlib2_imlib_remove_path_from_font_path00(lua_State* tolua_S)
4369 {
4370 #ifndef TOLUA_RELEASE
4371  tolua_Error tolua_err;
4372  if (
4373      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4374      !tolua_isnoobj(tolua_S,2,&tolua_err)
4375  )
4376   goto tolua_lerror;
4377  else
4378 #endif
4379  {
4380   const char* path = ((const char*)  tolua_tostring(tolua_S,1,0));
4381   {
4382    imlib_remove_path_from_font_path(path);
4383   }
4384  }
4385  return 0;
4386 #ifndef TOLUA_RELEASE
4387  tolua_lerror:
4388  tolua_error(tolua_S,"#ferror in function 'imlib_remove_path_from_font_path'.",&tolua_err);
4389  return 0;
4390 #endif
4391 }
4392 #endif //#ifndef TOLUA_DISABLE
4393
4394 /* function: imlib_list_font_path */
4395 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_list_font_path00
4396 static int tolua_imlib2_imlib_list_font_path00(lua_State* tolua_S)
4397 {
4398 #ifndef TOLUA_RELEASE
4399  tolua_Error tolua_err;
4400  if (
4401      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4402      !tolua_isnoobj(tolua_S,2,&tolua_err)
4403  )
4404   goto tolua_lerror;
4405  else
4406 #endif
4407  {
4408   int number_return = ((int)  tolua_tonumber(tolua_S,1,0));
4409   {
4410    char* tolua_ret = (char*)  imlib_list_font_path(&number_return);
4411    tolua_pushstring(tolua_S,(const char*)tolua_ret);
4412    tolua_pushnumber(tolua_S,(lua_Number)number_return);
4413   }
4414  }
4415  return 2;
4416 #ifndef TOLUA_RELEASE
4417  tolua_lerror:
4418  tolua_error(tolua_S,"#ferror in function 'imlib_list_font_path'.",&tolua_err);
4419  return 0;
4420 #endif
4421 }
4422 #endif //#ifndef TOLUA_DISABLE
4423
4424 /* function: imlib_text_get_index_and_location */
4425 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_text_get_index_and_location00
4426 static int tolua_imlib2_imlib_text_get_index_and_location00(lua_State* tolua_S)
4427 {
4428 #ifndef TOLUA_RELEASE
4429  tolua_Error tolua_err;
4430  if (
4431      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4432      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4433      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
4434      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
4435      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
4436      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
4437      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
4438      !tolua_isnoobj(tolua_S,8,&tolua_err)
4439  )
4440   goto tolua_lerror;
4441  else
4442 #endif
4443  {
4444   const char* text = ((const char*)  tolua_tostring(tolua_S,1,0));
4445   int x = ((int)  tolua_tonumber(tolua_S,2,0));
4446   int y = ((int)  tolua_tonumber(tolua_S,3,0));
4447   int char_x_return = ((int)  tolua_tonumber(tolua_S,4,0));
4448   int char_y_return = ((int)  tolua_tonumber(tolua_S,5,0));
4449   int char_width_return = ((int)  tolua_tonumber(tolua_S,6,0));
4450   int char_height_return = ((int)  tolua_tonumber(tolua_S,7,0));
4451   {
4452    int tolua_ret = (int)  imlib_text_get_index_and_location(text,x,y,&char_x_return,&char_y_return,&char_width_return,&char_height_return);
4453    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4454    tolua_pushnumber(tolua_S,(lua_Number)char_x_return);
4455    tolua_pushnumber(tolua_S,(lua_Number)char_y_return);
4456    tolua_pushnumber(tolua_S,(lua_Number)char_width_return);
4457    tolua_pushnumber(tolua_S,(lua_Number)char_height_return);
4458   }
4459  }
4460  return 5;
4461 #ifndef TOLUA_RELEASE
4462  tolua_lerror:
4463  tolua_error(tolua_S,"#ferror in function 'imlib_text_get_index_and_location'.",&tolua_err);
4464  return 0;
4465 #endif
4466 }
4467 #endif //#ifndef TOLUA_DISABLE
4468
4469 /* function: imlib_text_get_location_at_index */
4470 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_text_get_location_at_index00
4471 static int tolua_imlib2_imlib_text_get_location_at_index00(lua_State* tolua_S)
4472 {
4473 #ifndef TOLUA_RELEASE
4474  tolua_Error tolua_err;
4475  if (
4476      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4477      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4478      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
4479      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
4480      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
4481      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
4482      !tolua_isnoobj(tolua_S,7,&tolua_err)
4483  )
4484   goto tolua_lerror;
4485  else
4486 #endif
4487  {
4488   const char* text = ((const char*)  tolua_tostring(tolua_S,1,0));
4489   int index = ((int)  tolua_tonumber(tolua_S,2,0));
4490   int char_x_return = ((int)  tolua_tonumber(tolua_S,3,0));
4491   int char_y_return = ((int)  tolua_tonumber(tolua_S,4,0));
4492   int char_width_return = ((int)  tolua_tonumber(tolua_S,5,0));
4493   int char_height_return = ((int)  tolua_tonumber(tolua_S,6,0));
4494   {
4495    imlib_text_get_location_at_index(text,index,&char_x_return,&char_y_return,&char_width_return,&char_height_return);
4496    tolua_pushnumber(tolua_S,(lua_Number)char_x_return);
4497    tolua_pushnumber(tolua_S,(lua_Number)char_y_return);
4498    tolua_pushnumber(tolua_S,(lua_Number)char_width_return);
4499    tolua_pushnumber(tolua_S,(lua_Number)char_height_return);
4500   }
4501  }
4502  return 4;
4503 #ifndef TOLUA_RELEASE
4504  tolua_lerror:
4505  tolua_error(tolua_S,"#ferror in function 'imlib_text_get_location_at_index'.",&tolua_err);
4506  return 0;
4507 #endif
4508 }
4509 #endif //#ifndef TOLUA_DISABLE
4510
4511 /* function: imlib_list_fonts */
4512 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_list_fonts00
4513 static int tolua_imlib2_imlib_list_fonts00(lua_State* tolua_S)
4514 {
4515 #ifndef TOLUA_RELEASE
4516  tolua_Error tolua_err;
4517  if (
4518      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4519      !tolua_isnoobj(tolua_S,2,&tolua_err)
4520  )
4521   goto tolua_lerror;
4522  else
4523 #endif
4524  {
4525   int number_return = ((int)  tolua_tonumber(tolua_S,1,0));
4526   {
4527    char* tolua_ret = (char*)  imlib_list_fonts(&number_return);
4528    tolua_pushstring(tolua_S,(const char*)tolua_ret);
4529    tolua_pushnumber(tolua_S,(lua_Number)number_return);
4530   }
4531  }
4532  return 2;
4533 #ifndef TOLUA_RELEASE
4534  tolua_lerror:
4535  tolua_error(tolua_S,"#ferror in function 'imlib_list_fonts'.",&tolua_err);
4536  return 0;
4537 #endif
4538 }
4539 #endif //#ifndef TOLUA_DISABLE
4540
4541 /* function: imlib_free_font_list */
4542 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_free_font_list00
4543 static int tolua_imlib2_imlib_free_font_list00(lua_State* tolua_S)
4544 {
4545 #ifndef TOLUA_RELEASE
4546  tolua_Error tolua_err;
4547  if (
4548      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4549      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4550      !tolua_isnoobj(tolua_S,3,&tolua_err)
4551  )
4552   goto tolua_lerror;
4553  else
4554 #endif
4555  {
4556   char* font_list = ((char*)  tolua_tostring(tolua_S,1,0));
4557   int number = ((int)  tolua_tonumber(tolua_S,2,0));
4558   {
4559    imlib_free_font_list(&font_list,number);
4560    tolua_pushstring(tolua_S,(const char*)font_list);
4561   }
4562  }
4563  return 1;
4564 #ifndef TOLUA_RELEASE
4565  tolua_lerror:
4566  tolua_error(tolua_S,"#ferror in function 'imlib_free_font_list'.",&tolua_err);
4567  return 0;
4568 #endif
4569 }
4570 #endif //#ifndef TOLUA_DISABLE
4571
4572 /* function: imlib_get_font_cache_size */
4573 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_font_cache_size00
4574 static int tolua_imlib2_imlib_get_font_cache_size00(lua_State* tolua_S)
4575 {
4576 #ifndef TOLUA_RELEASE
4577  tolua_Error tolua_err;
4578  if (
4579      !tolua_isnoobj(tolua_S,1,&tolua_err)
4580  )
4581   goto tolua_lerror;
4582  else
4583 #endif
4584  {
4585   {
4586    int tolua_ret = (int)  imlib_get_font_cache_size();
4587    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4588   }
4589  }
4590  return 1;
4591 #ifndef TOLUA_RELEASE
4592  tolua_lerror:
4593  tolua_error(tolua_S,"#ferror in function 'imlib_get_font_cache_size'.",&tolua_err);
4594  return 0;
4595 #endif
4596 }
4597 #endif //#ifndef TOLUA_DISABLE
4598
4599 /* function: imlib_set_font_cache_size */
4600 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_set_font_cache_size00
4601 static int tolua_imlib2_imlib_set_font_cache_size00(lua_State* tolua_S)
4602 {
4603 #ifndef TOLUA_RELEASE
4604  tolua_Error tolua_err;
4605  if (
4606      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4607      !tolua_isnoobj(tolua_S,2,&tolua_err)
4608  )
4609   goto tolua_lerror;
4610  else
4611 #endif
4612  {
4613   int bytes = ((int)  tolua_tonumber(tolua_S,1,0));
4614   {
4615    imlib_set_font_cache_size(bytes);
4616   }
4617  }
4618  return 0;
4619 #ifndef TOLUA_RELEASE
4620  tolua_lerror:
4621  tolua_error(tolua_S,"#ferror in function 'imlib_set_font_cache_size'.",&tolua_err);
4622  return 0;
4623 #endif
4624 }
4625 #endif //#ifndef TOLUA_DISABLE
4626
4627 /* function: imlib_flush_font_cache */
4628 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_flush_font_cache00
4629 static int tolua_imlib2_imlib_flush_font_cache00(lua_State* tolua_S)
4630 {
4631 #ifndef TOLUA_RELEASE
4632  tolua_Error tolua_err;
4633  if (
4634      !tolua_isnoobj(tolua_S,1,&tolua_err)
4635  )
4636   goto tolua_lerror;
4637  else
4638 #endif
4639  {
4640   {
4641    imlib_flush_font_cache();
4642   }
4643  }
4644  return 0;
4645 #ifndef TOLUA_RELEASE
4646  tolua_lerror:
4647  tolua_error(tolua_S,"#ferror in function 'imlib_flush_font_cache'.",&tolua_err);
4648  return 0;
4649 #endif
4650 }
4651 #endif //#ifndef TOLUA_DISABLE
4652
4653 /* function: imlib_get_font_ascent */
4654 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_font_ascent00
4655 static int tolua_imlib2_imlib_get_font_ascent00(lua_State* tolua_S)
4656 {
4657 #ifndef TOLUA_RELEASE
4658  tolua_Error tolua_err;
4659  if (
4660      !tolua_isnoobj(tolua_S,1,&tolua_err)
4661  )
4662   goto tolua_lerror;
4663  else
4664 #endif
4665  {
4666   {
4667    int tolua_ret = (int)  imlib_get_font_ascent();
4668    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4669   }
4670  }
4671  return 1;
4672 #ifndef TOLUA_RELEASE
4673  tolua_lerror:
4674  tolua_error(tolua_S,"#ferror in function 'imlib_get_font_ascent'.",&tolua_err);
4675  return 0;
4676 #endif
4677 }
4678 #endif //#ifndef TOLUA_DISABLE
4679
4680 /* function: imlib_get_font_descent */
4681 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_font_descent00
4682 static int tolua_imlib2_imlib_get_font_descent00(lua_State* tolua_S)
4683 {
4684 #ifndef TOLUA_RELEASE
4685  tolua_Error tolua_err;
4686  if (
4687      !tolua_isnoobj(tolua_S,1,&tolua_err)
4688  )
4689   goto tolua_lerror;
4690  else
4691 #endif
4692  {
4693   {
4694    int tolua_ret = (int)  imlib_get_font_descent();
4695    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4696   }
4697  }
4698  return 1;
4699 #ifndef TOLUA_RELEASE
4700  tolua_lerror:
4701  tolua_error(tolua_S,"#ferror in function 'imlib_get_font_descent'.",&tolua_err);
4702  return 0;
4703 #endif
4704 }
4705 #endif //#ifndef TOLUA_DISABLE
4706
4707 /* function: imlib_get_maximum_font_ascent */
4708 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_maximum_font_ascent00
4709 static int tolua_imlib2_imlib_get_maximum_font_ascent00(lua_State* tolua_S)
4710 {
4711 #ifndef TOLUA_RELEASE
4712  tolua_Error tolua_err;
4713  if (
4714      !tolua_isnoobj(tolua_S,1,&tolua_err)
4715  )
4716   goto tolua_lerror;
4717  else
4718 #endif
4719  {
4720   {
4721    int tolua_ret = (int)  imlib_get_maximum_font_ascent();
4722    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4723   }
4724  }
4725  return 1;
4726 #ifndef TOLUA_RELEASE
4727  tolua_lerror:
4728  tolua_error(tolua_S,"#ferror in function 'imlib_get_maximum_font_ascent'.",&tolua_err);
4729  return 0;
4730 #endif
4731 }
4732 #endif //#ifndef TOLUA_DISABLE
4733
4734 /* function: imlib_get_maximum_font_descent */
4735 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_maximum_font_descent00
4736 static int tolua_imlib2_imlib_get_maximum_font_descent00(lua_State* tolua_S)
4737 {
4738 #ifndef TOLUA_RELEASE
4739  tolua_Error tolua_err;
4740  if (
4741      !tolua_isnoobj(tolua_S,1,&tolua_err)
4742  )
4743   goto tolua_lerror;
4744  else
4745 #endif
4746  {
4747   {
4748    int tolua_ret = (int)  imlib_get_maximum_font_descent();
4749    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4750   }
4751  }
4752  return 1;
4753 #ifndef TOLUA_RELEASE
4754  tolua_lerror:
4755  tolua_error(tolua_S,"#ferror in function 'imlib_get_maximum_font_descent'.",&tolua_err);
4756  return 0;
4757 #endif
4758 }
4759 #endif //#ifndef TOLUA_DISABLE
4760
4761 /* function: imlib_create_color_modifier */
4762 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_color_modifier00
4763 static int tolua_imlib2_imlib_create_color_modifier00(lua_State* tolua_S)
4764 {
4765 #ifndef TOLUA_RELEASE
4766  tolua_Error tolua_err;
4767  if (
4768      !tolua_isnoobj(tolua_S,1,&tolua_err)
4769  )
4770   goto tolua_lerror;
4771  else
4772 #endif
4773  {
4774   {
4775     _userdata tolua_ret = (  _userdata)  imlib_create_color_modifier();
4776    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
4777   }
4778  }
4779  return 1;
4780 #ifndef TOLUA_RELEASE
4781  tolua_lerror:
4782  tolua_error(tolua_S,"#ferror in function 'imlib_create_color_modifier'.",&tolua_err);
4783  return 0;
4784 #endif
4785 }
4786 #endif //#ifndef TOLUA_DISABLE
4787
4788 /* function: imlib_free_color_modifier */
4789 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_free_color_modifier00
4790 static int tolua_imlib2_imlib_free_color_modifier00(lua_State* tolua_S)
4791 {
4792 #ifndef TOLUA_RELEASE
4793  tolua_Error tolua_err;
4794  if (
4795      !tolua_isnoobj(tolua_S,1,&tolua_err)
4796  )
4797   goto tolua_lerror;
4798  else
4799 #endif
4800  {
4801   {
4802    imlib_free_color_modifier();
4803   }
4804  }
4805  return 0;
4806 #ifndef TOLUA_RELEASE
4807  tolua_lerror:
4808  tolua_error(tolua_S,"#ferror in function 'imlib_free_color_modifier'.",&tolua_err);
4809  return 0;
4810 #endif
4811 }
4812 #endif //#ifndef TOLUA_DISABLE
4813
4814 /* function: imlib_modify_color_modifier_gamma */
4815 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_modify_color_modifier_gamma00
4816 static int tolua_imlib2_imlib_modify_color_modifier_gamma00(lua_State* tolua_S)
4817 {
4818 #ifndef TOLUA_RELEASE
4819  tolua_Error tolua_err;
4820  if (
4821      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4822      !tolua_isnoobj(tolua_S,2,&tolua_err)
4823  )
4824   goto tolua_lerror;
4825  else
4826 #endif
4827  {
4828   double gamma_value = ((double)  tolua_tonumber(tolua_S,1,0));
4829   {
4830    imlib_modify_color_modifier_gamma(gamma_value);
4831   }
4832  }
4833  return 0;
4834 #ifndef TOLUA_RELEASE
4835  tolua_lerror:
4836  tolua_error(tolua_S,"#ferror in function 'imlib_modify_color_modifier_gamma'.",&tolua_err);
4837  return 0;
4838 #endif
4839 }
4840 #endif //#ifndef TOLUA_DISABLE
4841
4842 /* function: imlib_modify_color_modifier_brightness */
4843 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_modify_color_modifier_brightness00
4844 static int tolua_imlib2_imlib_modify_color_modifier_brightness00(lua_State* tolua_S)
4845 {
4846 #ifndef TOLUA_RELEASE
4847  tolua_Error tolua_err;
4848  if (
4849      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4850      !tolua_isnoobj(tolua_S,2,&tolua_err)
4851  )
4852   goto tolua_lerror;
4853  else
4854 #endif
4855  {
4856   double brightness_value = ((double)  tolua_tonumber(tolua_S,1,0));
4857   {
4858    imlib_modify_color_modifier_brightness(brightness_value);
4859   }
4860  }
4861  return 0;
4862 #ifndef TOLUA_RELEASE
4863  tolua_lerror:
4864  tolua_error(tolua_S,"#ferror in function 'imlib_modify_color_modifier_brightness'.",&tolua_err);
4865  return 0;
4866 #endif
4867 }
4868 #endif //#ifndef TOLUA_DISABLE
4869
4870 /* function: imlib_modify_color_modifier_contrast */
4871 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_modify_color_modifier_contrast00
4872 static int tolua_imlib2_imlib_modify_color_modifier_contrast00(lua_State* tolua_S)
4873 {
4874 #ifndef TOLUA_RELEASE
4875  tolua_Error tolua_err;
4876  if (
4877      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
4878      !tolua_isnoobj(tolua_S,2,&tolua_err)
4879  )
4880   goto tolua_lerror;
4881  else
4882 #endif
4883  {
4884   double contrast_value = ((double)  tolua_tonumber(tolua_S,1,0));
4885   {
4886    imlib_modify_color_modifier_contrast(contrast_value);
4887   }
4888  }
4889  return 0;
4890 #ifndef TOLUA_RELEASE
4891  tolua_lerror:
4892  tolua_error(tolua_S,"#ferror in function 'imlib_modify_color_modifier_contrast'.",&tolua_err);
4893  return 0;
4894 #endif
4895 }
4896 #endif //#ifndef TOLUA_DISABLE
4897
4898 /* function: imlib_set_color_modifier_tables */
4899 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_set_color_modifier_tables00
4900 static int tolua_imlib2_imlib_set_color_modifier_tables00(lua_State* tolua_S)
4901 {
4902 #ifndef TOLUA_RELEASE
4903  tolua_Error tolua_err;
4904  if (
4905      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4906      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
4907      !tolua_isstring(tolua_S,3,0,&tolua_err) ||
4908      !tolua_isstring(tolua_S,4,0,&tolua_err) ||
4909      !tolua_isnoobj(tolua_S,5,&tolua_err)
4910  )
4911   goto tolua_lerror;
4912  else
4913 #endif
4914  {
4915   unsigned char* red_table = ((unsigned char*)  tolua_tostring(tolua_S,1,0));
4916   unsigned char* green_table = ((unsigned char*)  tolua_tostring(tolua_S,2,0));
4917   unsigned char* blue_table = ((unsigned char*)  tolua_tostring(tolua_S,3,0));
4918   unsigned char* alpha_table = ((unsigned char*)  tolua_tostring(tolua_S,4,0));
4919   {
4920    imlib_set_color_modifier_tables(red_table,green_table,blue_table,alpha_table);
4921   }
4922  }
4923  return 0;
4924 #ifndef TOLUA_RELEASE
4925  tolua_lerror:
4926  tolua_error(tolua_S,"#ferror in function 'imlib_set_color_modifier_tables'.",&tolua_err);
4927  return 0;
4928 #endif
4929 }
4930 #endif //#ifndef TOLUA_DISABLE
4931
4932 /* function: imlib_get_color_modifier_tables */
4933 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_get_color_modifier_tables00
4934 static int tolua_imlib2_imlib_get_color_modifier_tables00(lua_State* tolua_S)
4935 {
4936 #ifndef TOLUA_RELEASE
4937  tolua_Error tolua_err;
4938  if (
4939      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
4940      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
4941      !tolua_isstring(tolua_S,3,0,&tolua_err) ||
4942      !tolua_isstring(tolua_S,4,0,&tolua_err) ||
4943      !tolua_isnoobj(tolua_S,5,&tolua_err)
4944  )
4945   goto tolua_lerror;
4946  else
4947 #endif
4948  {
4949   unsigned char* red_table = ((unsigned char*)  tolua_tostring(tolua_S,1,0));
4950   unsigned char* green_table = ((unsigned char*)  tolua_tostring(tolua_S,2,0));
4951   unsigned char* blue_table = ((unsigned char*)  tolua_tostring(tolua_S,3,0));
4952   unsigned char* alpha_table = ((unsigned char*)  tolua_tostring(tolua_S,4,0));
4953   {
4954    imlib_get_color_modifier_tables(red_table,green_table,blue_table,alpha_table);
4955   }
4956  }
4957  return 0;
4958 #ifndef TOLUA_RELEASE
4959  tolua_lerror:
4960  tolua_error(tolua_S,"#ferror in function 'imlib_get_color_modifier_tables'.",&tolua_err);
4961  return 0;
4962 #endif
4963 }
4964 #endif //#ifndef TOLUA_DISABLE
4965
4966 /* function: imlib_reset_color_modifier */
4967 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_reset_color_modifier00
4968 static int tolua_imlib2_imlib_reset_color_modifier00(lua_State* tolua_S)
4969 {
4970 #ifndef TOLUA_RELEASE
4971  tolua_Error tolua_err;
4972  if (
4973      !tolua_isnoobj(tolua_S,1,&tolua_err)
4974  )
4975   goto tolua_lerror;
4976  else
4977 #endif
4978  {
4979   {
4980    imlib_reset_color_modifier();
4981   }
4982  }
4983  return 0;
4984 #ifndef TOLUA_RELEASE
4985  tolua_lerror:
4986  tolua_error(tolua_S,"#ferror in function 'imlib_reset_color_modifier'.",&tolua_err);
4987  return 0;
4988 #endif
4989 }
4990 #endif //#ifndef TOLUA_DISABLE
4991
4992 /* function: imlib_apply_color_modifier */
4993 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_apply_color_modifier00
4994 static int tolua_imlib2_imlib_apply_color_modifier00(lua_State* tolua_S)
4995 {
4996 #ifndef TOLUA_RELEASE
4997  tolua_Error tolua_err;
4998  if (
4999      !tolua_isnoobj(tolua_S,1,&tolua_err)
5000  )
5001   goto tolua_lerror;
5002  else
5003 #endif
5004  {
5005   {
5006    imlib_apply_color_modifier();
5007   }
5008  }
5009  return 0;
5010 #ifndef TOLUA_RELEASE
5011  tolua_lerror:
5012  tolua_error(tolua_S,"#ferror in function 'imlib_apply_color_modifier'.",&tolua_err);
5013  return 0;
5014 #endif
5015 }
5016 #endif //#ifndef TOLUA_DISABLE
5017
5018 /* function: imlib_apply_color_modifier_to_rectangle */
5019 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_apply_color_modifier_to_rectangle00
5020 static int tolua_imlib2_imlib_apply_color_modifier_to_rectangle00(lua_State* tolua_S)
5021 {
5022 #ifndef TOLUA_RELEASE
5023  tolua_Error tolua_err;
5024  if (
5025      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5026      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5027      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5028      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5029      !tolua_isnoobj(tolua_S,5,&tolua_err)
5030  )
5031   goto tolua_lerror;
5032  else
5033 #endif
5034  {
5035   int x = ((int)  tolua_tonumber(tolua_S,1,0));
5036   int y = ((int)  tolua_tonumber(tolua_S,2,0));
5037   int width = ((int)  tolua_tonumber(tolua_S,3,0));
5038   int height = ((int)  tolua_tonumber(tolua_S,4,0));
5039   {
5040    imlib_apply_color_modifier_to_rectangle(x,y,width,height);
5041   }
5042  }
5043  return 0;
5044 #ifndef TOLUA_RELEASE
5045  tolua_lerror:
5046  tolua_error(tolua_S,"#ferror in function 'imlib_apply_color_modifier_to_rectangle'.",&tolua_err);
5047  return 0;
5048 #endif
5049 }
5050 #endif //#ifndef TOLUA_DISABLE
5051
5052 /* function: imlib_image_draw_pixel */
5053 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_draw_pixel00
5054 static int tolua_imlib2_imlib_image_draw_pixel00(lua_State* tolua_S)
5055 {
5056 #ifndef TOLUA_RELEASE
5057  tolua_Error tolua_err;
5058  if (
5059      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5060      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5061      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5062      !tolua_isnoobj(tolua_S,4,&tolua_err)
5063  )
5064   goto tolua_lerror;
5065  else
5066 #endif
5067  {
5068   int x = ((int)  tolua_tonumber(tolua_S,1,0));
5069   int y = ((int)  tolua_tonumber(tolua_S,2,0));
5070   char make_updates = ((char)  tolua_tonumber(tolua_S,3,0));
5071   {
5072     _userdata tolua_ret = (  _userdata)  imlib_image_draw_pixel(x,y,make_updates);
5073    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
5074   }
5075  }
5076  return 1;
5077 #ifndef TOLUA_RELEASE
5078  tolua_lerror:
5079  tolua_error(tolua_S,"#ferror in function 'imlib_image_draw_pixel'.",&tolua_err);
5080  return 0;
5081 #endif
5082 }
5083 #endif //#ifndef TOLUA_DISABLE
5084
5085 /* function: imlib_image_draw_line */
5086 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_draw_line00
5087 static int tolua_imlib2_imlib_image_draw_line00(lua_State* tolua_S)
5088 {
5089 #ifndef TOLUA_RELEASE
5090  tolua_Error tolua_err;
5091  if (
5092      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5093      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5094      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5095      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5096      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
5097      !tolua_isnoobj(tolua_S,6,&tolua_err)
5098  )
5099   goto tolua_lerror;
5100  else
5101 #endif
5102  {
5103   int x1 = ((int)  tolua_tonumber(tolua_S,1,0));
5104   int y1 = ((int)  tolua_tonumber(tolua_S,2,0));
5105   int x2 = ((int)  tolua_tonumber(tolua_S,3,0));
5106   int y2 = ((int)  tolua_tonumber(tolua_S,4,0));
5107   char make_updates = ((char)  tolua_tonumber(tolua_S,5,0));
5108   {
5109     _userdata tolua_ret = (  _userdata)  imlib_image_draw_line(x1,y1,x2,y2,make_updates);
5110    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
5111   }
5112  }
5113  return 1;
5114 #ifndef TOLUA_RELEASE
5115  tolua_lerror:
5116  tolua_error(tolua_S,"#ferror in function 'imlib_image_draw_line'.",&tolua_err);
5117  return 0;
5118 #endif
5119 }
5120 #endif //#ifndef TOLUA_DISABLE
5121
5122 /* function: imlib_image_draw_rectangle */
5123 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_draw_rectangle00
5124 static int tolua_imlib2_imlib_image_draw_rectangle00(lua_State* tolua_S)
5125 {
5126 #ifndef TOLUA_RELEASE
5127  tolua_Error tolua_err;
5128  if (
5129      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5130      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5131      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5132      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5133      !tolua_isnoobj(tolua_S,5,&tolua_err)
5134  )
5135   goto tolua_lerror;
5136  else
5137 #endif
5138  {
5139   int x = ((int)  tolua_tonumber(tolua_S,1,0));
5140   int y = ((int)  tolua_tonumber(tolua_S,2,0));
5141   int width = ((int)  tolua_tonumber(tolua_S,3,0));
5142   int height = ((int)  tolua_tonumber(tolua_S,4,0));
5143   {
5144    imlib_image_draw_rectangle(x,y,width,height);
5145   }
5146  }
5147  return 0;
5148 #ifndef TOLUA_RELEASE
5149  tolua_lerror:
5150  tolua_error(tolua_S,"#ferror in function 'imlib_image_draw_rectangle'.",&tolua_err);
5151  return 0;
5152 #endif
5153 }
5154 #endif //#ifndef TOLUA_DISABLE
5155
5156 /* function: imlib_image_fill_rectangle */
5157 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_fill_rectangle00
5158 static int tolua_imlib2_imlib_image_fill_rectangle00(lua_State* tolua_S)
5159 {
5160 #ifndef TOLUA_RELEASE
5161  tolua_Error tolua_err;
5162  if (
5163      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5164      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5165      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5166      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5167      !tolua_isnoobj(tolua_S,5,&tolua_err)
5168  )
5169   goto tolua_lerror;
5170  else
5171 #endif
5172  {
5173   int x = ((int)  tolua_tonumber(tolua_S,1,0));
5174   int y = ((int)  tolua_tonumber(tolua_S,2,0));
5175   int width = ((int)  tolua_tonumber(tolua_S,3,0));
5176   int height = ((int)  tolua_tonumber(tolua_S,4,0));
5177   {
5178    imlib_image_fill_rectangle(x,y,width,height);
5179   }
5180  }
5181  return 0;
5182 #ifndef TOLUA_RELEASE
5183  tolua_lerror:
5184  tolua_error(tolua_S,"#ferror in function 'imlib_image_fill_rectangle'.",&tolua_err);
5185  return 0;
5186 #endif
5187 }
5188 #endif //#ifndef TOLUA_DISABLE
5189
5190 /* function: imlib_image_copy_alpha_to_image */
5191 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_copy_alpha_to_image00
5192 static int tolua_imlib2_imlib_image_copy_alpha_to_image00(lua_State* tolua_S)
5193 {
5194 #ifndef TOLUA_RELEASE
5195  tolua_Error tolua_err;
5196  if (
5197      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
5198      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5199      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5200      !tolua_isnoobj(tolua_S,4,&tolua_err)
5201  )
5202   goto tolua_lerror;
5203  else
5204 #endif
5205  {
5206    _userdata image_source = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
5207   int x = ((int)  tolua_tonumber(tolua_S,2,0));
5208   int y = ((int)  tolua_tonumber(tolua_S,3,0));
5209   {
5210    imlib_image_copy_alpha_to_image(image_source,x,y);
5211   }
5212  }
5213  return 0;
5214 #ifndef TOLUA_RELEASE
5215  tolua_lerror:
5216  tolua_error(tolua_S,"#ferror in function 'imlib_image_copy_alpha_to_image'.",&tolua_err);
5217  return 0;
5218 #endif
5219 }
5220 #endif //#ifndef TOLUA_DISABLE
5221
5222 /* function: imlib_image_copy_alpha_rectangle_to_image */
5223 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_copy_alpha_rectangle_to_image00
5224 static int tolua_imlib2_imlib_image_copy_alpha_rectangle_to_image00(lua_State* tolua_S)
5225 {
5226 #ifndef TOLUA_RELEASE
5227  tolua_Error tolua_err;
5228  if (
5229      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
5230      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5231      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5232      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5233      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
5234      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
5235      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
5236      !tolua_isnoobj(tolua_S,8,&tolua_err)
5237  )
5238   goto tolua_lerror;
5239  else
5240 #endif
5241  {
5242    _userdata image_source = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
5243   int x = ((int)  tolua_tonumber(tolua_S,2,0));
5244   int y = ((int)  tolua_tonumber(tolua_S,3,0));
5245   int width = ((int)  tolua_tonumber(tolua_S,4,0));
5246   int height = ((int)  tolua_tonumber(tolua_S,5,0));
5247   int destination_x = ((int)  tolua_tonumber(tolua_S,6,0));
5248   int destination_y = ((int)  tolua_tonumber(tolua_S,7,0));
5249   {
5250    imlib_image_copy_alpha_rectangle_to_image(image_source,x,y,width,height,destination_x,destination_y);
5251   }
5252  }
5253  return 0;
5254 #ifndef TOLUA_RELEASE
5255  tolua_lerror:
5256  tolua_error(tolua_S,"#ferror in function 'imlib_image_copy_alpha_rectangle_to_image'.",&tolua_err);
5257  return 0;
5258 #endif
5259 }
5260 #endif //#ifndef TOLUA_DISABLE
5261
5262 /* function: imlib_image_scroll_rect */
5263 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_scroll_rect00
5264 static int tolua_imlib2_imlib_image_scroll_rect00(lua_State* tolua_S)
5265 {
5266 #ifndef TOLUA_RELEASE
5267  tolua_Error tolua_err;
5268  if (
5269      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5270      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5271      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5272      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5273      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
5274      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
5275      !tolua_isnoobj(tolua_S,7,&tolua_err)
5276  )
5277   goto tolua_lerror;
5278  else
5279 #endif
5280  {
5281   int x = ((int)  tolua_tonumber(tolua_S,1,0));
5282   int y = ((int)  tolua_tonumber(tolua_S,2,0));
5283   int width = ((int)  tolua_tonumber(tolua_S,3,0));
5284   int height = ((int)  tolua_tonumber(tolua_S,4,0));
5285   int delta_x = ((int)  tolua_tonumber(tolua_S,5,0));
5286   int delta_y = ((int)  tolua_tonumber(tolua_S,6,0));
5287   {
5288    imlib_image_scroll_rect(x,y,width,height,delta_x,delta_y);
5289   }
5290  }
5291  return 0;
5292 #ifndef TOLUA_RELEASE
5293  tolua_lerror:
5294  tolua_error(tolua_S,"#ferror in function 'imlib_image_scroll_rect'.",&tolua_err);
5295  return 0;
5296 #endif
5297 }
5298 #endif //#ifndef TOLUA_DISABLE
5299
5300 /* function: imlib_image_copy_rect */
5301 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_copy_rect00
5302 static int tolua_imlib2_imlib_image_copy_rect00(lua_State* tolua_S)
5303 {
5304 #ifndef TOLUA_RELEASE
5305  tolua_Error tolua_err;
5306  if (
5307      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5308      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5309      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5310      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5311      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
5312      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
5313      !tolua_isnoobj(tolua_S,7,&tolua_err)
5314  )
5315   goto tolua_lerror;
5316  else
5317 #endif
5318  {
5319   int x = ((int)  tolua_tonumber(tolua_S,1,0));
5320   int y = ((int)  tolua_tonumber(tolua_S,2,0));
5321   int width = ((int)  tolua_tonumber(tolua_S,3,0));
5322   int height = ((int)  tolua_tonumber(tolua_S,4,0));
5323   int new_x = ((int)  tolua_tonumber(tolua_S,5,0));
5324   int new_y = ((int)  tolua_tonumber(tolua_S,6,0));
5325   {
5326    imlib_image_copy_rect(x,y,width,height,new_x,new_y);
5327   }
5328  }
5329  return 0;
5330 #ifndef TOLUA_RELEASE
5331  tolua_lerror:
5332  tolua_error(tolua_S,"#ferror in function 'imlib_image_copy_rect'.",&tolua_err);
5333  return 0;
5334 #endif
5335 }
5336 #endif //#ifndef TOLUA_DISABLE
5337
5338 /* function: imlib_polygon_new */
5339 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_polygon_new00
5340 static int tolua_imlib2_imlib_polygon_new00(lua_State* tolua_S)
5341 {
5342 #ifndef TOLUA_RELEASE
5343  tolua_Error tolua_err;
5344  if (
5345      !tolua_isnoobj(tolua_S,1,&tolua_err)
5346  )
5347   goto tolua_lerror;
5348  else
5349 #endif
5350  {
5351   {
5352     _userdata tolua_ret = (  _userdata)  imlib_polygon_new();
5353    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
5354   }
5355  }
5356  return 1;
5357 #ifndef TOLUA_RELEASE
5358  tolua_lerror:
5359  tolua_error(tolua_S,"#ferror in function 'imlib_polygon_new'.",&tolua_err);
5360  return 0;
5361 #endif
5362 }
5363 #endif //#ifndef TOLUA_DISABLE
5364
5365 /* function: imlib_polygon_free */
5366 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_polygon_free00
5367 static int tolua_imlib2_imlib_polygon_free00(lua_State* tolua_S)
5368 {
5369 #ifndef TOLUA_RELEASE
5370  tolua_Error tolua_err;
5371  if (
5372      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
5373      !tolua_isnoobj(tolua_S,2,&tolua_err)
5374  )
5375   goto tolua_lerror;
5376  else
5377 #endif
5378  {
5379    _userdata poly = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
5380   {
5381    imlib_polygon_free(poly);
5382   }
5383  }
5384  return 0;
5385 #ifndef TOLUA_RELEASE
5386  tolua_lerror:
5387  tolua_error(tolua_S,"#ferror in function 'imlib_polygon_free'.",&tolua_err);
5388  return 0;
5389 #endif
5390 }
5391 #endif //#ifndef TOLUA_DISABLE
5392
5393 /* function: imlib_polygon_add_point */
5394 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_polygon_add_point00
5395 static int tolua_imlib2_imlib_polygon_add_point00(lua_State* tolua_S)
5396 {
5397 #ifndef TOLUA_RELEASE
5398  tolua_Error tolua_err;
5399  if (
5400      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
5401      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5402      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5403      !tolua_isnoobj(tolua_S,4,&tolua_err)
5404  )
5405   goto tolua_lerror;
5406  else
5407 #endif
5408  {
5409    _userdata poly = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
5410   int x = ((int)  tolua_tonumber(tolua_S,2,0));
5411   int y = ((int)  tolua_tonumber(tolua_S,3,0));
5412   {
5413    imlib_polygon_add_point(poly,x,y);
5414   }
5415  }
5416  return 0;
5417 #ifndef TOLUA_RELEASE
5418  tolua_lerror:
5419  tolua_error(tolua_S,"#ferror in function 'imlib_polygon_add_point'.",&tolua_err);
5420  return 0;
5421 #endif
5422 }
5423 #endif //#ifndef TOLUA_DISABLE
5424
5425 /* function: imlib_image_draw_polygon */
5426 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_draw_polygon00
5427 static int tolua_imlib2_imlib_image_draw_polygon00(lua_State* tolua_S)
5428 {
5429 #ifndef TOLUA_RELEASE
5430  tolua_Error tolua_err;
5431  if (
5432      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
5433      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5434      !tolua_isnoobj(tolua_S,3,&tolua_err)
5435  )
5436   goto tolua_lerror;
5437  else
5438 #endif
5439  {
5440    _userdata poly = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
5441   unsigned char closed = ((unsigned char)  tolua_tonumber(tolua_S,2,0));
5442   {
5443    imlib_image_draw_polygon(poly,closed);
5444   }
5445  }
5446  return 0;
5447 #ifndef TOLUA_RELEASE
5448  tolua_lerror:
5449  tolua_error(tolua_S,"#ferror in function 'imlib_image_draw_polygon'.",&tolua_err);
5450  return 0;
5451 #endif
5452 }
5453 #endif //#ifndef TOLUA_DISABLE
5454
5455 /* function: imlib_image_fill_polygon */
5456 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_fill_polygon00
5457 static int tolua_imlib2_imlib_image_fill_polygon00(lua_State* tolua_S)
5458 {
5459 #ifndef TOLUA_RELEASE
5460  tolua_Error tolua_err;
5461  if (
5462      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
5463      !tolua_isnoobj(tolua_S,2,&tolua_err)
5464  )
5465   goto tolua_lerror;
5466  else
5467 #endif
5468  {
5469    _userdata poly = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
5470   {
5471    imlib_image_fill_polygon(poly);
5472   }
5473  }
5474  return 0;
5475 #ifndef TOLUA_RELEASE
5476  tolua_lerror:
5477  tolua_error(tolua_S,"#ferror in function 'imlib_image_fill_polygon'.",&tolua_err);
5478  return 0;
5479 #endif
5480 }
5481 #endif //#ifndef TOLUA_DISABLE
5482
5483 /* function: imlib_polygon_get_bounds */
5484 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_polygon_get_bounds00
5485 static int tolua_imlib2_imlib_polygon_get_bounds00(lua_State* tolua_S)
5486 {
5487 #ifndef TOLUA_RELEASE
5488  tolua_Error tolua_err;
5489  if (
5490      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
5491      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5492      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5493      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5494      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
5495      !tolua_isnoobj(tolua_S,6,&tolua_err)
5496  )
5497   goto tolua_lerror;
5498  else
5499 #endif
5500  {
5501    _userdata poly = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
5502   int px1 = ((int)  tolua_tonumber(tolua_S,2,0));
5503   int py1 = ((int)  tolua_tonumber(tolua_S,3,0));
5504   int px2 = ((int)  tolua_tonumber(tolua_S,4,0));
5505   int py2 = ((int)  tolua_tonumber(tolua_S,5,0));
5506   {
5507    imlib_polygon_get_bounds(poly,&px1,&py1,&px2,&py2);
5508    tolua_pushnumber(tolua_S,(lua_Number)px1);
5509    tolua_pushnumber(tolua_S,(lua_Number)py1);
5510    tolua_pushnumber(tolua_S,(lua_Number)px2);
5511    tolua_pushnumber(tolua_S,(lua_Number)py2);
5512   }
5513  }
5514  return 4;
5515 #ifndef TOLUA_RELEASE
5516  tolua_lerror:
5517  tolua_error(tolua_S,"#ferror in function 'imlib_polygon_get_bounds'.",&tolua_err);
5518  return 0;
5519 #endif
5520 }
5521 #endif //#ifndef TOLUA_DISABLE
5522
5523 /* function: imlib_polygon_contains_point */
5524 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_polygon_contains_point00
5525 static int tolua_imlib2_imlib_polygon_contains_point00(lua_State* tolua_S)
5526 {
5527 #ifndef TOLUA_RELEASE
5528  tolua_Error tolua_err;
5529  if (
5530      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
5531      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5532      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5533      !tolua_isnoobj(tolua_S,4,&tolua_err)
5534  )
5535   goto tolua_lerror;
5536  else
5537 #endif
5538  {
5539    _userdata poly = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
5540   int x = ((int)  tolua_tonumber(tolua_S,2,0));
5541   int y = ((int)  tolua_tonumber(tolua_S,3,0));
5542   {
5543    unsigned char tolua_ret = (unsigned char)  imlib_polygon_contains_point(poly,x,y);
5544    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5545   }
5546  }
5547  return 1;
5548 #ifndef TOLUA_RELEASE
5549  tolua_lerror:
5550  tolua_error(tolua_S,"#ferror in function 'imlib_polygon_contains_point'.",&tolua_err);
5551  return 0;
5552 #endif
5553 }
5554 #endif //#ifndef TOLUA_DISABLE
5555
5556 /* function: imlib_image_draw_ellipse */
5557 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_draw_ellipse00
5558 static int tolua_imlib2_imlib_image_draw_ellipse00(lua_State* tolua_S)
5559 {
5560 #ifndef TOLUA_RELEASE
5561  tolua_Error tolua_err;
5562  if (
5563      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5564      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5565      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5566      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5567      !tolua_isnoobj(tolua_S,5,&tolua_err)
5568  )
5569   goto tolua_lerror;
5570  else
5571 #endif
5572  {
5573   int xc = ((int)  tolua_tonumber(tolua_S,1,0));
5574   int yc = ((int)  tolua_tonumber(tolua_S,2,0));
5575   int a = ((int)  tolua_tonumber(tolua_S,3,0));
5576   int b = ((int)  tolua_tonumber(tolua_S,4,0));
5577   {
5578    imlib_image_draw_ellipse(xc,yc,a,b);
5579   }
5580  }
5581  return 0;
5582 #ifndef TOLUA_RELEASE
5583  tolua_lerror:
5584  tolua_error(tolua_S,"#ferror in function 'imlib_image_draw_ellipse'.",&tolua_err);
5585  return 0;
5586 #endif
5587 }
5588 #endif //#ifndef TOLUA_DISABLE
5589
5590 /* function: imlib_image_fill_ellipse */
5591 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_fill_ellipse00
5592 static int tolua_imlib2_imlib_image_fill_ellipse00(lua_State* tolua_S)
5593 {
5594 #ifndef TOLUA_RELEASE
5595  tolua_Error tolua_err;
5596  if (
5597      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5598      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5599      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5600      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5601      !tolua_isnoobj(tolua_S,5,&tolua_err)
5602  )
5603   goto tolua_lerror;
5604  else
5605 #endif
5606  {
5607   int xc = ((int)  tolua_tonumber(tolua_S,1,0));
5608   int yc = ((int)  tolua_tonumber(tolua_S,2,0));
5609   int a = ((int)  tolua_tonumber(tolua_S,3,0));
5610   int b = ((int)  tolua_tonumber(tolua_S,4,0));
5611   {
5612    imlib_image_fill_ellipse(xc,yc,a,b);
5613   }
5614  }
5615  return 0;
5616 #ifndef TOLUA_RELEASE
5617  tolua_lerror:
5618  tolua_error(tolua_S,"#ferror in function 'imlib_image_fill_ellipse'.",&tolua_err);
5619  return 0;
5620 #endif
5621 }
5622 #endif //#ifndef TOLUA_DISABLE
5623
5624 /* function: imlib_create_color_range */
5625 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_color_range00
5626 static int tolua_imlib2_imlib_create_color_range00(lua_State* tolua_S)
5627 {
5628 #ifndef TOLUA_RELEASE
5629  tolua_Error tolua_err;
5630  if (
5631      !tolua_isnoobj(tolua_S,1,&tolua_err)
5632  )
5633   goto tolua_lerror;
5634  else
5635 #endif
5636  {
5637   {
5638     _userdata tolua_ret = (  _userdata)  imlib_create_color_range();
5639    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
5640   }
5641  }
5642  return 1;
5643 #ifndef TOLUA_RELEASE
5644  tolua_lerror:
5645  tolua_error(tolua_S,"#ferror in function 'imlib_create_color_range'.",&tolua_err);
5646  return 0;
5647 #endif
5648 }
5649 #endif //#ifndef TOLUA_DISABLE
5650
5651 /* function: imlib_free_color_range */
5652 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_free_color_range00
5653 static int tolua_imlib2_imlib_free_color_range00(lua_State* tolua_S)
5654 {
5655 #ifndef TOLUA_RELEASE
5656  tolua_Error tolua_err;
5657  if (
5658      !tolua_isnoobj(tolua_S,1,&tolua_err)
5659  )
5660   goto tolua_lerror;
5661  else
5662 #endif
5663  {
5664   {
5665    imlib_free_color_range();
5666   }
5667  }
5668  return 0;
5669 #ifndef TOLUA_RELEASE
5670  tolua_lerror:
5671  tolua_error(tolua_S,"#ferror in function 'imlib_free_color_range'.",&tolua_err);
5672  return 0;
5673 #endif
5674 }
5675 #endif //#ifndef TOLUA_DISABLE
5676
5677 /* function: imlib_add_color_to_color_range */
5678 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_add_color_to_color_range00
5679 static int tolua_imlib2_imlib_add_color_to_color_range00(lua_State* tolua_S)
5680 {
5681 #ifndef TOLUA_RELEASE
5682  tolua_Error tolua_err;
5683  if (
5684      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5685      !tolua_isnoobj(tolua_S,2,&tolua_err)
5686  )
5687   goto tolua_lerror;
5688  else
5689 #endif
5690  {
5691   int distance_away = ((int)  tolua_tonumber(tolua_S,1,0));
5692   {
5693    imlib_add_color_to_color_range(distance_away);
5694   }
5695  }
5696  return 0;
5697 #ifndef TOLUA_RELEASE
5698  tolua_lerror:
5699  tolua_error(tolua_S,"#ferror in function 'imlib_add_color_to_color_range'.",&tolua_err);
5700  return 0;
5701 #endif
5702 }
5703 #endif //#ifndef TOLUA_DISABLE
5704
5705 /* function: imlib_image_fill_color_range_rectangle */
5706 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_fill_color_range_rectangle00
5707 static int tolua_imlib2_imlib_image_fill_color_range_rectangle00(lua_State* tolua_S)
5708 {
5709 #ifndef TOLUA_RELEASE
5710  tolua_Error tolua_err;
5711  if (
5712      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5713      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5714      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5715      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5716      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
5717      !tolua_isnoobj(tolua_S,6,&tolua_err)
5718  )
5719   goto tolua_lerror;
5720  else
5721 #endif
5722  {
5723   int x = ((int)  tolua_tonumber(tolua_S,1,0));
5724   int y = ((int)  tolua_tonumber(tolua_S,2,0));
5725   int width = ((int)  tolua_tonumber(tolua_S,3,0));
5726   int height = ((int)  tolua_tonumber(tolua_S,4,0));
5727   double angle = ((double)  tolua_tonumber(tolua_S,5,0));
5728   {
5729    imlib_image_fill_color_range_rectangle(x,y,width,height,angle);
5730   }
5731  }
5732  return 0;
5733 #ifndef TOLUA_RELEASE
5734  tolua_lerror:
5735  tolua_error(tolua_S,"#ferror in function 'imlib_image_fill_color_range_rectangle'.",&tolua_err);
5736  return 0;
5737 #endif
5738 }
5739 #endif //#ifndef TOLUA_DISABLE
5740
5741 /* function: imlib_image_fill_hsva_color_range_rectangle */
5742 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_fill_hsva_color_range_rectangle00
5743 static int tolua_imlib2_imlib_image_fill_hsva_color_range_rectangle00(lua_State* tolua_S)
5744 {
5745 #ifndef TOLUA_RELEASE
5746  tolua_Error tolua_err;
5747  if (
5748      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5749      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5750      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5751      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
5752      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
5753      !tolua_isnoobj(tolua_S,6,&tolua_err)
5754  )
5755   goto tolua_lerror;
5756  else
5757 #endif
5758  {
5759   int x = ((int)  tolua_tonumber(tolua_S,1,0));
5760   int y = ((int)  tolua_tonumber(tolua_S,2,0));
5761   int width = ((int)  tolua_tonumber(tolua_S,3,0));
5762   int height = ((int)  tolua_tonumber(tolua_S,4,0));
5763   double angle = ((double)  tolua_tonumber(tolua_S,5,0));
5764   {
5765    imlib_image_fill_hsva_color_range_rectangle(x,y,width,height,angle);
5766   }
5767  }
5768  return 0;
5769 #ifndef TOLUA_RELEASE
5770  tolua_lerror:
5771  tolua_error(tolua_S,"#ferror in function 'imlib_image_fill_hsva_color_range_rectangle'.",&tolua_err);
5772  return 0;
5773 #endif
5774 }
5775 #endif //#ifndef TOLUA_DISABLE
5776
5777 /* function: imlib_image_attach_data_value */
5778 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_attach_data_value00
5779 static int tolua_imlib2_imlib_image_attach_data_value00(lua_State* tolua_S)
5780 {
5781 #ifndef TOLUA_RELEASE
5782  tolua_Error tolua_err;
5783  if (
5784      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
5785      !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
5786      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5787      (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"Imlib_Data_Destructor_Function",0,&tolua_err)) ||
5788      !tolua_isnoobj(tolua_S,5,&tolua_err)
5789  )
5790   goto tolua_lerror;
5791  else
5792 #endif
5793  {
5794   const char* key = ((const char*)  tolua_tostring(tolua_S,1,0));
5795   void* data = ((void*)  tolua_touserdata(tolua_S,2,0));
5796   int value = ((int)  tolua_tonumber(tolua_S,3,0));
5797   Imlib_Data_Destructor_Function destructor_function = *((Imlib_Data_Destructor_Function*)  tolua_tousertype(tolua_S,4,0));
5798   {
5799    imlib_image_attach_data_value(key,data,value,destructor_function);
5800   }
5801  }
5802  return 0;
5803 #ifndef TOLUA_RELEASE
5804  tolua_lerror:
5805  tolua_error(tolua_S,"#ferror in function 'imlib_image_attach_data_value'.",&tolua_err);
5806  return 0;
5807 #endif
5808 }
5809 #endif //#ifndef TOLUA_DISABLE
5810
5811 /* function: imlib_image_get_attached_data */
5812 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_get_attached_data00
5813 static int tolua_imlib2_imlib_image_get_attached_data00(lua_State* tolua_S)
5814 {
5815 #ifndef TOLUA_RELEASE
5816  tolua_Error tolua_err;
5817  if (
5818      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
5819      !tolua_isnoobj(tolua_S,2,&tolua_err)
5820  )
5821   goto tolua_lerror;
5822  else
5823 #endif
5824  {
5825   const char* key = ((const char*)  tolua_tostring(tolua_S,1,0));
5826   {
5827    void* tolua_ret = (void*)  imlib_image_get_attached_data(key);
5828    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
5829   }
5830  }
5831  return 1;
5832 #ifndef TOLUA_RELEASE
5833  tolua_lerror:
5834  tolua_error(tolua_S,"#ferror in function 'imlib_image_get_attached_data'.",&tolua_err);
5835  return 0;
5836 #endif
5837 }
5838 #endif //#ifndef TOLUA_DISABLE
5839
5840 /* function: imlib_image_get_attached_value */
5841 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_get_attached_value00
5842 static int tolua_imlib2_imlib_image_get_attached_value00(lua_State* tolua_S)
5843 {
5844 #ifndef TOLUA_RELEASE
5845  tolua_Error tolua_err;
5846  if (
5847      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
5848      !tolua_isnoobj(tolua_S,2,&tolua_err)
5849  )
5850   goto tolua_lerror;
5851  else
5852 #endif
5853  {
5854   const char* key = ((const char*)  tolua_tostring(tolua_S,1,0));
5855   {
5856    int tolua_ret = (int)  imlib_image_get_attached_value(key);
5857    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5858   }
5859  }
5860  return 1;
5861 #ifndef TOLUA_RELEASE
5862  tolua_lerror:
5863  tolua_error(tolua_S,"#ferror in function 'imlib_image_get_attached_value'.",&tolua_err);
5864  return 0;
5865 #endif
5866 }
5867 #endif //#ifndef TOLUA_DISABLE
5868
5869 /* function: imlib_image_remove_attached_data_value */
5870 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_remove_attached_data_value00
5871 static int tolua_imlib2_imlib_image_remove_attached_data_value00(lua_State* tolua_S)
5872 {
5873 #ifndef TOLUA_RELEASE
5874  tolua_Error tolua_err;
5875  if (
5876      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
5877      !tolua_isnoobj(tolua_S,2,&tolua_err)
5878  )
5879   goto tolua_lerror;
5880  else
5881 #endif
5882  {
5883   const char* key = ((const char*)  tolua_tostring(tolua_S,1,0));
5884   {
5885    imlib_image_remove_attached_data_value(key);
5886   }
5887  }
5888  return 0;
5889 #ifndef TOLUA_RELEASE
5890  tolua_lerror:
5891  tolua_error(tolua_S,"#ferror in function 'imlib_image_remove_attached_data_value'.",&tolua_err);
5892  return 0;
5893 #endif
5894 }
5895 #endif //#ifndef TOLUA_DISABLE
5896
5897 /* function: imlib_image_remove_and_free_attached_data_value */
5898 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_remove_and_free_attached_data_value00
5899 static int tolua_imlib2_imlib_image_remove_and_free_attached_data_value00(lua_State* tolua_S)
5900 {
5901 #ifndef TOLUA_RELEASE
5902  tolua_Error tolua_err;
5903  if (
5904      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
5905      !tolua_isnoobj(tolua_S,2,&tolua_err)
5906  )
5907   goto tolua_lerror;
5908  else
5909 #endif
5910  {
5911   const char* key = ((const char*)  tolua_tostring(tolua_S,1,0));
5912   {
5913    imlib_image_remove_and_free_attached_data_value(key);
5914   }
5915  }
5916  return 0;
5917 #ifndef TOLUA_RELEASE
5918  tolua_lerror:
5919  tolua_error(tolua_S,"#ferror in function 'imlib_image_remove_and_free_attached_data_value'.",&tolua_err);
5920  return 0;
5921 #endif
5922 }
5923 #endif //#ifndef TOLUA_DISABLE
5924
5925 /* function: imlib_save_image */
5926 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_save_image00
5927 static int tolua_imlib2_imlib_save_image00(lua_State* tolua_S)
5928 {
5929 #ifndef TOLUA_RELEASE
5930  tolua_Error tolua_err;
5931  if (
5932      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
5933      !tolua_isnoobj(tolua_S,2,&tolua_err)
5934  )
5935   goto tolua_lerror;
5936  else
5937 #endif
5938  {
5939   const char* filename = ((const char*)  tolua_tostring(tolua_S,1,0));
5940   {
5941    imlib_save_image(filename);
5942   }
5943  }
5944  return 0;
5945 #ifndef TOLUA_RELEASE
5946  tolua_lerror:
5947  tolua_error(tolua_S,"#ferror in function 'imlib_save_image'.",&tolua_err);
5948  return 0;
5949 #endif
5950 }
5951 #endif //#ifndef TOLUA_DISABLE
5952
5953 /* function: imlib_save_image_with_error_return */
5954 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_save_image_with_error_return00
5955 static int tolua_imlib2_imlib_save_image_with_error_return00(lua_State* tolua_S)
5956 {
5957 #ifndef TOLUA_RELEASE
5958  tolua_Error tolua_err;
5959  if (
5960      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
5961      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5962      !tolua_isnoobj(tolua_S,3,&tolua_err)
5963  )
5964   goto tolua_lerror;
5965  else
5966 #endif
5967  {
5968   const char* filename = ((const char*)  tolua_tostring(tolua_S,1,0));
5969   Imlib_Load_Error error_return = ((Imlib_Load_Error) (int)  tolua_tonumber(tolua_S,2,0));
5970   {
5971    imlib_save_image_with_error_return(filename,&error_return);
5972    tolua_pushnumber(tolua_S,(lua_Number)error_return);
5973   }
5974  }
5975  return 1;
5976 #ifndef TOLUA_RELEASE
5977  tolua_lerror:
5978  tolua_error(tolua_S,"#ferror in function 'imlib_save_image_with_error_return'.",&tolua_err);
5979  return 0;
5980 #endif
5981 }
5982 #endif //#ifndef TOLUA_DISABLE
5983
5984 /* function: imlib_create_rotated_image */
5985 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_rotated_image00
5986 static int tolua_imlib2_imlib_create_rotated_image00(lua_State* tolua_S)
5987 {
5988 #ifndef TOLUA_RELEASE
5989  tolua_Error tolua_err;
5990  if (
5991      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
5992      !tolua_isnoobj(tolua_S,2,&tolua_err)
5993  )
5994   goto tolua_lerror;
5995  else
5996 #endif
5997  {
5998   double angle = ((double)  tolua_tonumber(tolua_S,1,0));
5999   {
6000     _userdata tolua_ret = (  _userdata)  imlib_create_rotated_image(angle);
6001    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
6002   }
6003  }
6004  return 1;
6005 #ifndef TOLUA_RELEASE
6006  tolua_lerror:
6007  tolua_error(tolua_S,"#ferror in function 'imlib_create_rotated_image'.",&tolua_err);
6008  return 0;
6009 #endif
6010 }
6011 #endif //#ifndef TOLUA_DISABLE
6012
6013 /* function: imlib_rotate_image_from_buffer */
6014 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_rotate_image_from_buffer00
6015 static int tolua_imlib2_imlib_rotate_image_from_buffer00(lua_State* tolua_S)
6016 {
6017 #ifndef TOLUA_RELEASE
6018  tolua_Error tolua_err;
6019  if (
6020      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6021      !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
6022      !tolua_isnoobj(tolua_S,3,&tolua_err)
6023  )
6024   goto tolua_lerror;
6025  else
6026 #endif
6027  {
6028   double angle = ((double)  tolua_tonumber(tolua_S,1,0));
6029    _userdata source_image = ((  _userdata)  tolua_touserdata(tolua_S,2,0));
6030   {
6031    imlib_rotate_image_from_buffer(angle,source_image);
6032   }
6033  }
6034  return 0;
6035 #ifndef TOLUA_RELEASE
6036  tolua_lerror:
6037  tolua_error(tolua_S,"#ferror in function 'imlib_rotate_image_from_buffer'.",&tolua_err);
6038  return 0;
6039 #endif
6040 }
6041 #endif //#ifndef TOLUA_DISABLE
6042
6043 /* function: imlib_blend_image_onto_image_at_angle */
6044 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_blend_image_onto_image_at_angle00
6045 static int tolua_imlib2_imlib_blend_image_onto_image_at_angle00(lua_State* tolua_S)
6046 {
6047 #ifndef TOLUA_RELEASE
6048  tolua_Error tolua_err;
6049  if (
6050      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
6051      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6052      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6053      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6054      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
6055      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
6056      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
6057      !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
6058      !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
6059      !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
6060      !tolua_isnoobj(tolua_S,11,&tolua_err)
6061  )
6062   goto tolua_lerror;
6063  else
6064 #endif
6065  {
6066    _userdata source_image = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
6067   char merge_alpha = ((char)  tolua_tonumber(tolua_S,2,0));
6068   int source_x = ((int)  tolua_tonumber(tolua_S,3,0));
6069   int source_y = ((int)  tolua_tonumber(tolua_S,4,0));
6070   int source_width = ((int)  tolua_tonumber(tolua_S,5,0));
6071   int source_height = ((int)  tolua_tonumber(tolua_S,6,0));
6072   int destination_x = ((int)  tolua_tonumber(tolua_S,7,0));
6073   int destination_y = ((int)  tolua_tonumber(tolua_S,8,0));
6074   int angle_x = ((int)  tolua_tonumber(tolua_S,9,0));
6075   int angle_y = ((int)  tolua_tonumber(tolua_S,10,0));
6076   {
6077    imlib_blend_image_onto_image_at_angle(source_image,merge_alpha,source_x,source_y,source_width,source_height,destination_x,destination_y,angle_x,angle_y);
6078   }
6079  }
6080  return 0;
6081 #ifndef TOLUA_RELEASE
6082  tolua_lerror:
6083  tolua_error(tolua_S,"#ferror in function 'imlib_blend_image_onto_image_at_angle'.",&tolua_err);
6084  return 0;
6085 #endif
6086 }
6087 #endif //#ifndef TOLUA_DISABLE
6088
6089 /* function: imlib_blend_image_onto_image_skewed */
6090 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_blend_image_onto_image_skewed00
6091 static int tolua_imlib2_imlib_blend_image_onto_image_skewed00(lua_State* tolua_S)
6092 {
6093 #ifndef TOLUA_RELEASE
6094  tolua_Error tolua_err;
6095  if (
6096      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
6097      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6098      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6099      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6100      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
6101      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
6102      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
6103      !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
6104      !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
6105      !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
6106      !tolua_isnumber(tolua_S,11,0,&tolua_err) ||
6107      !tolua_isnumber(tolua_S,12,0,&tolua_err) ||
6108      !tolua_isnoobj(tolua_S,13,&tolua_err)
6109  )
6110   goto tolua_lerror;
6111  else
6112 #endif
6113  {
6114    _userdata source_image = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
6115   char merge_alpha = ((char)  tolua_tonumber(tolua_S,2,0));
6116   int source_x = ((int)  tolua_tonumber(tolua_S,3,0));
6117   int source_y = ((int)  tolua_tonumber(tolua_S,4,0));
6118   int source_width = ((int)  tolua_tonumber(tolua_S,5,0));
6119   int source_height = ((int)  tolua_tonumber(tolua_S,6,0));
6120   int destination_x = ((int)  tolua_tonumber(tolua_S,7,0));
6121   int destination_y = ((int)  tolua_tonumber(tolua_S,8,0));
6122   int h_angle_x = ((int)  tolua_tonumber(tolua_S,9,0));
6123   int h_angle_y = ((int)  tolua_tonumber(tolua_S,10,0));
6124   int v_angle_x = ((int)  tolua_tonumber(tolua_S,11,0));
6125   int v_angle_y = ((int)  tolua_tonumber(tolua_S,12,0));
6126   {
6127    imlib_blend_image_onto_image_skewed(source_image,merge_alpha,source_x,source_y,source_width,source_height,destination_x,destination_y,h_angle_x,h_angle_y,v_angle_x,v_angle_y);
6128   }
6129  }
6130  return 0;
6131 #ifndef TOLUA_RELEASE
6132  tolua_lerror:
6133  tolua_error(tolua_S,"#ferror in function 'imlib_blend_image_onto_image_skewed'.",&tolua_err);
6134  return 0;
6135 #endif
6136 }
6137 #endif //#ifndef TOLUA_DISABLE
6138
6139 /* function: imlib_render_image_on_drawable_skewed */
6140 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_render_image_on_drawable_skewed00
6141 static int tolua_imlib2_imlib_render_image_on_drawable_skewed00(lua_State* tolua_S)
6142 {
6143 #ifndef TOLUA_RELEASE
6144  tolua_Error tolua_err;
6145  if (
6146      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6147      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6148      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6149      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6150      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
6151      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
6152      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
6153      !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
6154      !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
6155      !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
6156      !tolua_isnoobj(tolua_S,11,&tolua_err)
6157  )
6158   goto tolua_lerror;
6159  else
6160 #endif
6161  {
6162   int source_x = ((int)  tolua_tonumber(tolua_S,1,0));
6163   int source_y = ((int)  tolua_tonumber(tolua_S,2,0));
6164   int source_width = ((int)  tolua_tonumber(tolua_S,3,0));
6165   int source_height = ((int)  tolua_tonumber(tolua_S,4,0));
6166   int destination_x = ((int)  tolua_tonumber(tolua_S,5,0));
6167   int destination_y = ((int)  tolua_tonumber(tolua_S,6,0));
6168   int h_angle_x = ((int)  tolua_tonumber(tolua_S,7,0));
6169   int h_angle_y = ((int)  tolua_tonumber(tolua_S,8,0));
6170   int v_angle_x = ((int)  tolua_tonumber(tolua_S,9,0));
6171   int v_angle_y = ((int)  tolua_tonumber(tolua_S,10,0));
6172   {
6173    imlib_render_image_on_drawable_skewed(source_x,source_y,source_width,source_height,destination_x,destination_y,h_angle_x,h_angle_y,v_angle_x,v_angle_y);
6174   }
6175  }
6176  return 0;
6177 #ifndef TOLUA_RELEASE
6178  tolua_lerror:
6179  tolua_error(tolua_S,"#ferror in function 'imlib_render_image_on_drawable_skewed'.",&tolua_err);
6180  return 0;
6181 #endif
6182 }
6183 #endif //#ifndef TOLUA_DISABLE
6184
6185 /* function: imlib_render_image_on_drawable_at_angle */
6186 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_render_image_on_drawable_at_angle00
6187 static int tolua_imlib2_imlib_render_image_on_drawable_at_angle00(lua_State* tolua_S)
6188 {
6189 #ifndef TOLUA_RELEASE
6190  tolua_Error tolua_err;
6191  if (
6192      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6193      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6194      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6195      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6196      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
6197      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
6198      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
6199      !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
6200      !tolua_isnoobj(tolua_S,9,&tolua_err)
6201  )
6202   goto tolua_lerror;
6203  else
6204 #endif
6205  {
6206   int source_x = ((int)  tolua_tonumber(tolua_S,1,0));
6207   int source_y = ((int)  tolua_tonumber(tolua_S,2,0));
6208   int source_width = ((int)  tolua_tonumber(tolua_S,3,0));
6209   int source_height = ((int)  tolua_tonumber(tolua_S,4,0));
6210   int destination_x = ((int)  tolua_tonumber(tolua_S,5,0));
6211   int destination_y = ((int)  tolua_tonumber(tolua_S,6,0));
6212   int angle_x = ((int)  tolua_tonumber(tolua_S,7,0));
6213   int angle_y = ((int)  tolua_tonumber(tolua_S,8,0));
6214   {
6215    imlib_render_image_on_drawable_at_angle(source_x,source_y,source_width,source_height,destination_x,destination_y,angle_x,angle_y);
6216   }
6217  }
6218  return 0;
6219 #ifndef TOLUA_RELEASE
6220  tolua_lerror:
6221  tolua_error(tolua_S,"#ferror in function 'imlib_render_image_on_drawable_at_angle'.",&tolua_err);
6222  return 0;
6223 #endif
6224 }
6225 #endif //#ifndef TOLUA_DISABLE
6226
6227 /* function: imlib_image_filter */
6228 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_filter00
6229 static int tolua_imlib2_imlib_image_filter00(lua_State* tolua_S)
6230 {
6231 #ifndef TOLUA_RELEASE
6232  tolua_Error tolua_err;
6233  if (
6234      !tolua_isnoobj(tolua_S,1,&tolua_err)
6235  )
6236   goto tolua_lerror;
6237  else
6238 #endif
6239  {
6240   {
6241    imlib_image_filter();
6242   }
6243  }
6244  return 0;
6245 #ifndef TOLUA_RELEASE
6246  tolua_lerror:
6247  tolua_error(tolua_S,"#ferror in function 'imlib_image_filter'.",&tolua_err);
6248  return 0;
6249 #endif
6250 }
6251 #endif //#ifndef TOLUA_DISABLE
6252
6253 /* function: imlib_create_filter */
6254 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_create_filter00
6255 static int tolua_imlib2_imlib_create_filter00(lua_State* tolua_S)
6256 {
6257 #ifndef TOLUA_RELEASE
6258  tolua_Error tolua_err;
6259  if (
6260      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6261      !tolua_isnoobj(tolua_S,2,&tolua_err)
6262  )
6263   goto tolua_lerror;
6264  else
6265 #endif
6266  {
6267   int initsize = ((int)  tolua_tonumber(tolua_S,1,0));
6268   {
6269     _userdata tolua_ret = (  _userdata)  imlib_create_filter(initsize);
6270    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
6271   }
6272  }
6273  return 1;
6274 #ifndef TOLUA_RELEASE
6275  tolua_lerror:
6276  tolua_error(tolua_S,"#ferror in function 'imlib_create_filter'.",&tolua_err);
6277  return 0;
6278 #endif
6279 }
6280 #endif //#ifndef TOLUA_DISABLE
6281
6282 /* function: imlib_context_set_filter */
6283 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_set_filter00
6284 static int tolua_imlib2_imlib_context_set_filter00(lua_State* tolua_S)
6285 {
6286 #ifndef TOLUA_RELEASE
6287  tolua_Error tolua_err;
6288  if (
6289      !tolua_isuserdata(tolua_S,1,0,&tolua_err) ||
6290      !tolua_isnoobj(tolua_S,2,&tolua_err)
6291  )
6292   goto tolua_lerror;
6293  else
6294 #endif
6295  {
6296    _userdata filter = ((  _userdata)  tolua_touserdata(tolua_S,1,0));
6297   {
6298    imlib_context_set_filter(filter);
6299   }
6300  }
6301  return 0;
6302 #ifndef TOLUA_RELEASE
6303  tolua_lerror:
6304  tolua_error(tolua_S,"#ferror in function 'imlib_context_set_filter'.",&tolua_err);
6305  return 0;
6306 #endif
6307 }
6308 #endif //#ifndef TOLUA_DISABLE
6309
6310 /* function: imlib_context_get_filter */
6311 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_context_get_filter00
6312 static int tolua_imlib2_imlib_context_get_filter00(lua_State* tolua_S)
6313 {
6314 #ifndef TOLUA_RELEASE
6315  tolua_Error tolua_err;
6316  if (
6317      !tolua_isnoobj(tolua_S,1,&tolua_err)
6318  )
6319   goto tolua_lerror;
6320  else
6321 #endif
6322  {
6323   {
6324     _userdata tolua_ret = (  _userdata)  imlib_context_get_filter();
6325    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
6326   }
6327  }
6328  return 1;
6329 #ifndef TOLUA_RELEASE
6330  tolua_lerror:
6331  tolua_error(tolua_S,"#ferror in function 'imlib_context_get_filter'.",&tolua_err);
6332  return 0;
6333 #endif
6334 }
6335 #endif //#ifndef TOLUA_DISABLE
6336
6337 /* function: imlib_free_filter */
6338 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_free_filter00
6339 static int tolua_imlib2_imlib_free_filter00(lua_State* tolua_S)
6340 {
6341 #ifndef TOLUA_RELEASE
6342  tolua_Error tolua_err;
6343  if (
6344      !tolua_isnoobj(tolua_S,1,&tolua_err)
6345  )
6346   goto tolua_lerror;
6347  else
6348 #endif
6349  {
6350   {
6351    imlib_free_filter();
6352   }
6353  }
6354  return 0;
6355 #ifndef TOLUA_RELEASE
6356  tolua_lerror:
6357  tolua_error(tolua_S,"#ferror in function 'imlib_free_filter'.",&tolua_err);
6358  return 0;
6359 #endif
6360 }
6361 #endif //#ifndef TOLUA_DISABLE
6362
6363 /* function: imlib_filter_set */
6364 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_filter_set00
6365 static int tolua_imlib2_imlib_filter_set00(lua_State* tolua_S)
6366 {
6367 #ifndef TOLUA_RELEASE
6368  tolua_Error tolua_err;
6369  if (
6370      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6371      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6372      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6373      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6374      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
6375      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
6376      !tolua_isnoobj(tolua_S,7,&tolua_err)
6377  )
6378   goto tolua_lerror;
6379  else
6380 #endif
6381  {
6382   int xoff = ((int)  tolua_tonumber(tolua_S,1,0));
6383   int yoff = ((int)  tolua_tonumber(tolua_S,2,0));
6384   int a = ((int)  tolua_tonumber(tolua_S,3,0));
6385   int r = ((int)  tolua_tonumber(tolua_S,4,0));
6386   int g = ((int)  tolua_tonumber(tolua_S,5,0));
6387   int b = ((int)  tolua_tonumber(tolua_S,6,0));
6388   {
6389    imlib_filter_set(xoff,yoff,a,r,g,b);
6390   }
6391  }
6392  return 0;
6393 #ifndef TOLUA_RELEASE
6394  tolua_lerror:
6395  tolua_error(tolua_S,"#ferror in function 'imlib_filter_set'.",&tolua_err);
6396  return 0;
6397 #endif
6398 }
6399 #endif //#ifndef TOLUA_DISABLE
6400
6401 /* function: imlib_filter_set_alpha */
6402 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_filter_set_alpha00
6403 static int tolua_imlib2_imlib_filter_set_alpha00(lua_State* tolua_S)
6404 {
6405 #ifndef TOLUA_RELEASE
6406  tolua_Error tolua_err;
6407  if (
6408      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6409      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6410      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6411      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6412      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
6413      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
6414      !tolua_isnoobj(tolua_S,7,&tolua_err)
6415  )
6416   goto tolua_lerror;
6417  else
6418 #endif
6419  {
6420   int xoff = ((int)  tolua_tonumber(tolua_S,1,0));
6421   int yoff = ((int)  tolua_tonumber(tolua_S,2,0));
6422   int a = ((int)  tolua_tonumber(tolua_S,3,0));
6423   int r = ((int)  tolua_tonumber(tolua_S,4,0));
6424   int g = ((int)  tolua_tonumber(tolua_S,5,0));
6425   int b = ((int)  tolua_tonumber(tolua_S,6,0));
6426   {
6427    imlib_filter_set_alpha(xoff,yoff,a,r,g,b);
6428   }
6429  }
6430  return 0;
6431 #ifndef TOLUA_RELEASE
6432  tolua_lerror:
6433  tolua_error(tolua_S,"#ferror in function 'imlib_filter_set_alpha'.",&tolua_err);
6434  return 0;
6435 #endif
6436 }
6437 #endif //#ifndef TOLUA_DISABLE
6438
6439 /* function: imlib_filter_set_red */
6440 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_filter_set_red00
6441 static int tolua_imlib2_imlib_filter_set_red00(lua_State* tolua_S)
6442 {
6443 #ifndef TOLUA_RELEASE
6444  tolua_Error tolua_err;
6445  if (
6446      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6447      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6448      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6449      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6450      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
6451      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
6452      !tolua_isnoobj(tolua_S,7,&tolua_err)
6453  )
6454   goto tolua_lerror;
6455  else
6456 #endif
6457  {
6458   int xoff = ((int)  tolua_tonumber(tolua_S,1,0));
6459   int yoff = ((int)  tolua_tonumber(tolua_S,2,0));
6460   int a = ((int)  tolua_tonumber(tolua_S,3,0));
6461   int r = ((int)  tolua_tonumber(tolua_S,4,0));
6462   int g = ((int)  tolua_tonumber(tolua_S,5,0));
6463   int b = ((int)  tolua_tonumber(tolua_S,6,0));
6464   {
6465    imlib_filter_set_red(xoff,yoff,a,r,g,b);
6466   }
6467  }
6468  return 0;
6469 #ifndef TOLUA_RELEASE
6470  tolua_lerror:
6471  tolua_error(tolua_S,"#ferror in function 'imlib_filter_set_red'.",&tolua_err);
6472  return 0;
6473 #endif
6474 }
6475 #endif //#ifndef TOLUA_DISABLE
6476
6477 /* function: imlib_filter_set_green */
6478 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_filter_set_green00
6479 static int tolua_imlib2_imlib_filter_set_green00(lua_State* tolua_S)
6480 {
6481 #ifndef TOLUA_RELEASE
6482  tolua_Error tolua_err;
6483  if (
6484      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6485      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6486      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6487      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6488      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
6489      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
6490      !tolua_isnoobj(tolua_S,7,&tolua_err)
6491  )
6492   goto tolua_lerror;
6493  else
6494 #endif
6495  {
6496   int xoff = ((int)  tolua_tonumber(tolua_S,1,0));
6497   int yoff = ((int)  tolua_tonumber(tolua_S,2,0));
6498   int a = ((int)  tolua_tonumber(tolua_S,3,0));
6499   int r = ((int)  tolua_tonumber(tolua_S,4,0));
6500   int g = ((int)  tolua_tonumber(tolua_S,5,0));
6501   int b = ((int)  tolua_tonumber(tolua_S,6,0));
6502   {
6503    imlib_filter_set_green(xoff,yoff,a,r,g,b);
6504   }
6505  }
6506  return 0;
6507 #ifndef TOLUA_RELEASE
6508  tolua_lerror:
6509  tolua_error(tolua_S,"#ferror in function 'imlib_filter_set_green'.",&tolua_err);
6510  return 0;
6511 #endif
6512 }
6513 #endif //#ifndef TOLUA_DISABLE
6514
6515 /* function: imlib_filter_set_blue */
6516 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_filter_set_blue00
6517 static int tolua_imlib2_imlib_filter_set_blue00(lua_State* tolua_S)
6518 {
6519 #ifndef TOLUA_RELEASE
6520  tolua_Error tolua_err;
6521  if (
6522      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6523      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6524      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6525      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6526      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
6527      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
6528      !tolua_isnoobj(tolua_S,7,&tolua_err)
6529  )
6530   goto tolua_lerror;
6531  else
6532 #endif
6533  {
6534   int xoff = ((int)  tolua_tonumber(tolua_S,1,0));
6535   int yoff = ((int)  tolua_tonumber(tolua_S,2,0));
6536   int a = ((int)  tolua_tonumber(tolua_S,3,0));
6537   int r = ((int)  tolua_tonumber(tolua_S,4,0));
6538   int g = ((int)  tolua_tonumber(tolua_S,5,0));
6539   int b = ((int)  tolua_tonumber(tolua_S,6,0));
6540   {
6541    imlib_filter_set_blue(xoff,yoff,a,r,g,b);
6542   }
6543  }
6544  return 0;
6545 #ifndef TOLUA_RELEASE
6546  tolua_lerror:
6547  tolua_error(tolua_S,"#ferror in function 'imlib_filter_set_blue'.",&tolua_err);
6548  return 0;
6549 #endif
6550 }
6551 #endif //#ifndef TOLUA_DISABLE
6552
6553 /* function: imlib_filter_constants */
6554 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_filter_constants00
6555 static int tolua_imlib2_imlib_filter_constants00(lua_State* tolua_S)
6556 {
6557 #ifndef TOLUA_RELEASE
6558  tolua_Error tolua_err;
6559  if (
6560      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6561      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6562      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6563      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6564      !tolua_isnoobj(tolua_S,5,&tolua_err)
6565  )
6566   goto tolua_lerror;
6567  else
6568 #endif
6569  {
6570   int a = ((int)  tolua_tonumber(tolua_S,1,0));
6571   int r = ((int)  tolua_tonumber(tolua_S,2,0));
6572   int g = ((int)  tolua_tonumber(tolua_S,3,0));
6573   int b = ((int)  tolua_tonumber(tolua_S,4,0));
6574   {
6575    imlib_filter_constants(a,r,g,b);
6576   }
6577  }
6578  return 0;
6579 #ifndef TOLUA_RELEASE
6580  tolua_lerror:
6581  tolua_error(tolua_S,"#ferror in function 'imlib_filter_constants'.",&tolua_err);
6582  return 0;
6583 #endif
6584 }
6585 #endif //#ifndef TOLUA_DISABLE
6586
6587 /* function: imlib_filter_divisors */
6588 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_filter_divisors00
6589 static int tolua_imlib2_imlib_filter_divisors00(lua_State* tolua_S)
6590 {
6591 #ifndef TOLUA_RELEASE
6592  tolua_Error tolua_err;
6593  if (
6594      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6595      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6596      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6597      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6598      !tolua_isnoobj(tolua_S,5,&tolua_err)
6599  )
6600   goto tolua_lerror;
6601  else
6602 #endif
6603  {
6604   int a = ((int)  tolua_tonumber(tolua_S,1,0));
6605   int r = ((int)  tolua_tonumber(tolua_S,2,0));
6606   int g = ((int)  tolua_tonumber(tolua_S,3,0));
6607   int b = ((int)  tolua_tonumber(tolua_S,4,0));
6608   {
6609    imlib_filter_divisors(a,r,g,b);
6610   }
6611  }
6612  return 0;
6613 #ifndef TOLUA_RELEASE
6614  tolua_lerror:
6615  tolua_error(tolua_S,"#ferror in function 'imlib_filter_divisors'.",&tolua_err);
6616  return 0;
6617 #endif
6618 }
6619 #endif //#ifndef TOLUA_DISABLE
6620
6621 /* function: imlib_image_clear */
6622 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_clear00
6623 static int tolua_imlib2_imlib_image_clear00(lua_State* tolua_S)
6624 {
6625 #ifndef TOLUA_RELEASE
6626  tolua_Error tolua_err;
6627  if (
6628      !tolua_isnoobj(tolua_S,1,&tolua_err)
6629  )
6630   goto tolua_lerror;
6631  else
6632 #endif
6633  {
6634   {
6635    imlib_image_clear();
6636   }
6637  }
6638  return 0;
6639 #ifndef TOLUA_RELEASE
6640  tolua_lerror:
6641  tolua_error(tolua_S,"#ferror in function 'imlib_image_clear'.",&tolua_err);
6642  return 0;
6643 #endif
6644 }
6645 #endif //#ifndef TOLUA_DISABLE
6646
6647 /* function: imlib_image_clear_color */
6648 #ifndef TOLUA_DISABLE_tolua_imlib2_imlib_image_clear_color00
6649 static int tolua_imlib2_imlib_image_clear_color00(lua_State* tolua_S)
6650 {
6651 #ifndef TOLUA_RELEASE
6652  tolua_Error tolua_err;
6653  if (
6654      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6655      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6656      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6657      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6658      !tolua_isnoobj(tolua_S,5,&tolua_err)
6659  )
6660   goto tolua_lerror;
6661  else
6662 #endif
6663  {
6664   int r = ((int)  tolua_tonumber(tolua_S,1,0));
6665   int g = ((int)  tolua_tonumber(tolua_S,2,0));
6666   int b = ((int)  tolua_tonumber(tolua_S,3,0));
6667   int a = ((int)  tolua_tonumber(tolua_S,4,0));
6668   {
6669    imlib_image_clear_color(r,g,b,a);
6670   }
6671  }
6672  return 0;
6673 #ifndef TOLUA_RELEASE
6674  tolua_lerror:
6675  tolua_error(tolua_S,"#ferror in function 'imlib_image_clear_color'.",&tolua_err);
6676  return 0;
6677 #endif
6678 }
6679 #endif //#ifndef TOLUA_DISABLE
6680
6681 /* Open function */
6682 TOLUA_API int tolua_imlib2_open (lua_State* tolua_S)
6683 {
6684  tolua_open(tolua_S);
6685  tolua_reg_types(tolua_S);
6686  tolua_module(tolua_S,NULL,0);
6687  tolua_beginmodule(tolua_S,NULL);
6688   tolua_constant(tolua_S,"IMLIB_OP_COPY",IMLIB_OP_COPY);
6689   tolua_constant(tolua_S,"IMLIB_OP_ADD",IMLIB_OP_ADD);
6690   tolua_constant(tolua_S,"IMLIB_OP_SUBTRACT",IMLIB_OP_SUBTRACT);
6691   tolua_constant(tolua_S,"IMLIB_OP_RESHADE",IMLIB_OP_RESHADE);
6692   tolua_constant(tolua_S,"IMLIB_TEXT_TO_RIGHT",IMLIB_TEXT_TO_RIGHT);
6693   tolua_constant(tolua_S,"IMLIB_TEXT_TO_LEFT",IMLIB_TEXT_TO_LEFT);
6694   tolua_constant(tolua_S,"IMLIB_TEXT_TO_DOWN",IMLIB_TEXT_TO_DOWN);
6695   tolua_constant(tolua_S,"IMLIB_TEXT_TO_UP",IMLIB_TEXT_TO_UP);
6696   tolua_constant(tolua_S,"IMLIB_TEXT_TO_ANGLE",IMLIB_TEXT_TO_ANGLE);
6697   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_NONE",IMLIB_LOAD_ERROR_NONE);
6698   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST",IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST);
6699   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY",IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY);
6700   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_READ",IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_READ);
6701   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_NO_LOADER_FOR_FILE_FORMAT",IMLIB_LOAD_ERROR_NO_LOADER_FOR_FILE_FORMAT);
6702   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_PATH_TOO_LONG",IMLIB_LOAD_ERROR_PATH_TOO_LONG);
6703   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_PATH_COMPONENT_NON_EXISTANT",IMLIB_LOAD_ERROR_PATH_COMPONENT_NON_EXISTANT);
6704   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_PATH_COMPONENT_NOT_DIRECTORY",IMLIB_LOAD_ERROR_PATH_COMPONENT_NOT_DIRECTORY);
6705   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_PATH_POINTS_OUTSIDE_ADDRESS_SPACE",IMLIB_LOAD_ERROR_PATH_POINTS_OUTSIDE_ADDRESS_SPACE);
6706   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_TOO_MANY_SYMBOLIC_LINKS",IMLIB_LOAD_ERROR_TOO_MANY_SYMBOLIC_LINKS);
6707   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_OUT_OF_MEMORY",IMLIB_LOAD_ERROR_OUT_OF_MEMORY);
6708   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_OUT_OF_FILE_DESCRIPTORS",IMLIB_LOAD_ERROR_OUT_OF_FILE_DESCRIPTORS);
6709   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_WRITE",IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_WRITE);
6710   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_OUT_OF_DISK_SPACE",IMLIB_LOAD_ERROR_OUT_OF_DISK_SPACE);
6711   tolua_constant(tolua_S,"IMLIB_LOAD_ERROR_UNKNOWN",IMLIB_LOAD_ERROR_UNKNOWN);
6712   tolua_constant(tolua_S,"IMLIB_TTF_ENCODING_ISO_8859_1",IMLIB_TTF_ENCODING_ISO_8859_1);
6713   tolua_constant(tolua_S,"IMLIB_TTF_ENCODING_ISO_8859_2",IMLIB_TTF_ENCODING_ISO_8859_2);
6714   tolua_constant(tolua_S,"IMLIB_TTF_ENCODING_ISO_8859_3",IMLIB_TTF_ENCODING_ISO_8859_3);
6715   tolua_constant(tolua_S,"IMLIB_TTF_ENCODING_ISO_8859_4",IMLIB_TTF_ENCODING_ISO_8859_4);
6716   tolua_constant(tolua_S,"IMLIB_TTF_ENCODING_ISO_8859_5",IMLIB_TTF_ENCODING_ISO_8859_5);
6717   tolua_function(tolua_S,"imlib_context_new",tolua_imlib2_imlib_context_new00);
6718   tolua_function(tolua_S,"imlib_context_free",tolua_imlib2_imlib_context_free00);
6719   tolua_function(tolua_S,"imlib_context_push",tolua_imlib2_imlib_context_push00);
6720   tolua_function(tolua_S,"imlib_context_pop",tolua_imlib2_imlib_context_pop00);
6721   tolua_function(tolua_S,"imlib_context_get",tolua_imlib2_imlib_context_get00);
6722   tolua_function(tolua_S,"imlib_context_set_display",tolua_imlib2_imlib_context_set_display00);
6723   //tolua_function(tolua_S,"imlib_context_disconnect_display",tolua_imlib2_imlib_context_disconnect_display00);
6724   tolua_function(tolua_S,"imlib_context_set_visual",tolua_imlib2_imlib_context_set_visual00);
6725   tolua_function(tolua_S,"imlib_context_set_colormap",tolua_imlib2_imlib_context_set_colormap00);
6726   tolua_function(tolua_S,"imlib_context_set_drawable",tolua_imlib2_imlib_context_set_drawable00);
6727   tolua_function(tolua_S,"imlib_context_set_mask",tolua_imlib2_imlib_context_set_mask00);
6728   tolua_function(tolua_S,"imlib_context_set_dither_mask",tolua_imlib2_imlib_context_set_dither_mask00);
6729   tolua_function(tolua_S,"imlib_context_set_mask_alpha_threshold",tolua_imlib2_imlib_context_set_mask_alpha_threshold00);
6730   tolua_function(tolua_S,"imlib_context_set_anti_alias",tolua_imlib2_imlib_context_set_anti_alias00);
6731   tolua_function(tolua_S,"imlib_context_set_dither",tolua_imlib2_imlib_context_set_dither00);
6732   tolua_function(tolua_S,"imlib_context_set_blend",tolua_imlib2_imlib_context_set_blend00);
6733   tolua_function(tolua_S,"imlib_context_set_color_modifier",tolua_imlib2_imlib_context_set_color_modifier00);
6734   tolua_function(tolua_S,"imlib_context_set_operation",tolua_imlib2_imlib_context_set_operation00);
6735   tolua_function(tolua_S,"imlib_context_set_font",tolua_imlib2_imlib_context_set_font00);
6736   tolua_function(tolua_S,"imlib_context_set_direction",tolua_imlib2_imlib_context_set_direction00);
6737   tolua_function(tolua_S,"imlib_context_set_angle",tolua_imlib2_imlib_context_set_angle00);
6738   tolua_function(tolua_S,"imlib_context_set_color",tolua_imlib2_imlib_context_set_color00);
6739   tolua_function(tolua_S,"imlib_context_set_color_hsva",tolua_imlib2_imlib_context_set_color_hsva00);
6740   tolua_function(tolua_S,"imlib_context_set_color_hlsa",tolua_imlib2_imlib_context_set_color_hlsa00);
6741   tolua_function(tolua_S,"imlib_context_set_color_cmya",tolua_imlib2_imlib_context_set_color_cmya00);
6742   tolua_function(tolua_S,"imlib_context_set_color_range",tolua_imlib2_imlib_context_set_color_range00);
6743   tolua_function(tolua_S,"imlib_context_set_progress_function",tolua_imlib2_imlib_context_set_progress_function00);
6744   tolua_function(tolua_S,"imlib_context_set_progress_granularity",tolua_imlib2_imlib_context_set_progress_granularity00);
6745   tolua_function(tolua_S,"imlib_context_set_image",tolua_imlib2_imlib_context_set_image00);
6746   tolua_function(tolua_S,"imlib_context_set_cliprect",tolua_imlib2_imlib_context_set_cliprect00);
6747   tolua_function(tolua_S,"imlib_context_set_TTF_encoding",tolua_imlib2_imlib_context_set_TTF_encoding00);
6748   tolua_function(tolua_S,"imlib_context_get_display",tolua_imlib2_imlib_context_get_display00);
6749   tolua_function(tolua_S,"imlib_context_get_visual",tolua_imlib2_imlib_context_get_visual00);
6750   tolua_function(tolua_S,"imlib_context_get_colormap",tolua_imlib2_imlib_context_get_colormap00);
6751   tolua_function(tolua_S,"imlib_context_get_drawable",tolua_imlib2_imlib_context_get_drawable00);
6752   tolua_function(tolua_S,"imlib_context_get_mask",tolua_imlib2_imlib_context_get_mask00);
6753   tolua_function(tolua_S,"imlib_context_get_dither_mask",tolua_imlib2_imlib_context_get_dither_mask00);
6754   tolua_function(tolua_S,"imlib_context_get_anti_alias",tolua_imlib2_imlib_context_get_anti_alias00);
6755   tolua_function(tolua_S,"imlib_context_get_mask_alpha_threshold",tolua_imlib2_imlib_context_get_mask_alpha_threshold00);
6756   tolua_function(tolua_S,"imlib_context_get_dither",tolua_imlib2_imlib_context_get_dither00);
6757   tolua_function(tolua_S,"imlib_context_get_blend",tolua_imlib2_imlib_context_get_blend00);
6758   tolua_function(tolua_S,"imlib_context_get_color_modifier",tolua_imlib2_imlib_context_get_color_modifier00);
6759   tolua_function(tolua_S,"imlib_context_get_operation",tolua_imlib2_imlib_context_get_operation00);
6760   tolua_function(tolua_S,"imlib_context_get_font",tolua_imlib2_imlib_context_get_font00);
6761   tolua_function(tolua_S,"imlib_context_get_angle",tolua_imlib2_imlib_context_get_angle00);
6762   tolua_function(tolua_S,"imlib_context_get_direction",tolua_imlib2_imlib_context_get_direction00);
6763   tolua_function(tolua_S,"imlib_context_get_color",tolua_imlib2_imlib_context_get_color00);
6764   tolua_function(tolua_S,"imlib_context_get_color_hsva",tolua_imlib2_imlib_context_get_color_hsva00);
6765   tolua_function(tolua_S,"imlib_context_get_color_hlsa",tolua_imlib2_imlib_context_get_color_hlsa00);
6766   tolua_function(tolua_S,"imlib_context_get_color_cmya",tolua_imlib2_imlib_context_get_color_cmya00);
6767   tolua_function(tolua_S,"imlib_context_get_imlib_color",tolua_imlib2_imlib_context_get_imlib_color00);
6768   tolua_function(tolua_S,"imlib_context_get_color_range",tolua_imlib2_imlib_context_get_color_range00);
6769   tolua_function(tolua_S,"imlib_context_get_progress_function",tolua_imlib2_imlib_context_get_progress_function00);
6770   tolua_function(tolua_S,"imlib_context_get_progress_granularity",tolua_imlib2_imlib_context_get_progress_granularity00);
6771   tolua_function(tolua_S,"imlib_context_get_image",tolua_imlib2_imlib_context_get_image00);
6772   tolua_function(tolua_S,"imlib_context_get_cliprect",tolua_imlib2_imlib_context_get_cliprect00);
6773   tolua_function(tolua_S,"imlib_context_get_TTF_encoding",tolua_imlib2_imlib_context_get_TTF_encoding00);
6774   tolua_function(tolua_S,"imlib_get_cache_size",tolua_imlib2_imlib_get_cache_size00);
6775   tolua_function(tolua_S,"imlib_set_cache_size",tolua_imlib2_imlib_set_cache_size00);
6776   tolua_function(tolua_S,"imlib_get_color_usage",tolua_imlib2_imlib_get_color_usage00);
6777   tolua_function(tolua_S,"imlib_set_color_usage",tolua_imlib2_imlib_set_color_usage00);
6778   tolua_function(tolua_S,"imlib_flush_loaders",tolua_imlib2_imlib_flush_loaders00);
6779   tolua_function(tolua_S,"imlib_get_visual_depth",tolua_imlib2_imlib_get_visual_depth00);
6780   tolua_function(tolua_S,"imlib_get_best_visual",tolua_imlib2_imlib_get_best_visual00);
6781   tolua_function(tolua_S,"imlib_load_image",tolua_imlib2_imlib_load_image00);
6782   tolua_function(tolua_S,"imlib_load_image_immediately",tolua_imlib2_imlib_load_image_immediately00);
6783   tolua_function(tolua_S,"imlib_load_image_without_cache",tolua_imlib2_imlib_load_image_without_cache00);
6784   tolua_function(tolua_S,"imlib_load_image_immediately_without_cache",tolua_imlib2_imlib_load_image_immediately_without_cache00);
6785   tolua_function(tolua_S,"imlib_load_image_with_error_return",tolua_imlib2_imlib_load_image_with_error_return00);
6786   tolua_function(tolua_S,"imlib_free_image",tolua_imlib2_imlib_free_image00);
6787   tolua_function(tolua_S,"imlib_free_image_and_decache",tolua_imlib2_imlib_free_image_and_decache00);
6788   tolua_function(tolua_S,"imlib_image_get_width",tolua_imlib2_imlib_image_get_width00);
6789   tolua_function(tolua_S,"imlib_image_get_height",tolua_imlib2_imlib_image_get_height00);
6790   tolua_function(tolua_S,"imlib_image_get_filename",tolua_imlib2_imlib_image_get_filename00);
6791   tolua_function(tolua_S,"imlib_image_get_data",tolua_imlib2_imlib_image_get_data00);
6792   tolua_function(tolua_S,"imlib_image_get_data_for_reading_only",tolua_imlib2_imlib_image_get_data_for_reading_only00);
6793   tolua_function(tolua_S,"imlib_image_put_back_data",tolua_imlib2_imlib_image_put_back_data00);
6794   tolua_function(tolua_S,"imlib_image_has_alpha",tolua_imlib2_imlib_image_has_alpha00);
6795   tolua_function(tolua_S,"imlib_image_set_changes_on_disk",tolua_imlib2_imlib_image_set_changes_on_disk00);
6796   tolua_function(tolua_S,"imlib_image_get_border",tolua_imlib2_imlib_image_get_border00);
6797   tolua_function(tolua_S,"imlib_image_set_border",tolua_imlib2_imlib_image_set_border00);
6798   tolua_function(tolua_S,"imlib_image_set_format",tolua_imlib2_imlib_image_set_format00);
6799   tolua_function(tolua_S,"imlib_image_set_irrelevant_format",tolua_imlib2_imlib_image_set_irrelevant_format00);
6800   tolua_function(tolua_S,"imlib_image_set_irrelevant_border",tolua_imlib2_imlib_image_set_irrelevant_border00);
6801   tolua_function(tolua_S,"imlib_image_set_irrelevant_alpha",tolua_imlib2_imlib_image_set_irrelevant_alpha00);
6802   tolua_function(tolua_S,"imlib_image_format",tolua_imlib2_imlib_image_format00);
6803   tolua_function(tolua_S,"imlib_image_set_has_alpha",tolua_imlib2_imlib_image_set_has_alpha00);
6804   tolua_function(tolua_S,"imlib_image_query_pixel",tolua_imlib2_imlib_image_query_pixel00);
6805   tolua_function(tolua_S,"imlib_image_query_pixel_hsva",tolua_imlib2_imlib_image_query_pixel_hsva00);
6806   tolua_function(tolua_S,"imlib_image_query_pixel_hlsa",tolua_imlib2_imlib_image_query_pixel_hlsa00);
6807   tolua_function(tolua_S,"imlib_image_query_pixel_cmya",tolua_imlib2_imlib_image_query_pixel_cmya00);
6808   tolua_function(tolua_S,"imlib_render_pixmaps_for_whole_image",tolua_imlib2_imlib_render_pixmaps_for_whole_image00);
6809   tolua_function(tolua_S,"imlib_render_pixmaps_for_whole_image_at_size",tolua_imlib2_imlib_render_pixmaps_for_whole_image_at_size00);
6810   tolua_function(tolua_S,"imlib_free_pixmap_and_mask",tolua_imlib2_imlib_free_pixmap_and_mask00);
6811   tolua_function(tolua_S,"imlib_render_image_on_drawable",tolua_imlib2_imlib_render_image_on_drawable00);
6812   tolua_function(tolua_S,"imlib_render_image_on_drawable_at_size",tolua_imlib2_imlib_render_image_on_drawable_at_size00);
6813   tolua_function(tolua_S,"imlib_render_image_part_on_drawable_at_size",tolua_imlib2_imlib_render_image_part_on_drawable_at_size00);
6814   tolua_function(tolua_S,"imlib_render_get_pixel_color",tolua_imlib2_imlib_render_get_pixel_color00);
6815   tolua_function(tolua_S,"imlib_blend_image_onto_image",tolua_imlib2_imlib_blend_image_onto_image00);
6816   tolua_function(tolua_S,"imlib_create_image",tolua_imlib2_imlib_create_image00);
6817   tolua_function(tolua_S,"imlib_create_image_using_data",tolua_imlib2_imlib_create_image_using_data00);
6818   tolua_function(tolua_S,"imlib_create_image_using_copied_data",tolua_imlib2_imlib_create_image_using_copied_data00);
6819   tolua_function(tolua_S,"imlib_create_image_from_drawable",tolua_imlib2_imlib_create_image_from_drawable00);
6820   tolua_function(tolua_S,"imlib_create_image_from_ximage",tolua_imlib2_imlib_create_image_from_ximage00);
6821   tolua_function(tolua_S,"imlib_create_scaled_image_from_drawable",tolua_imlib2_imlib_create_scaled_image_from_drawable00);
6822   tolua_function(tolua_S,"imlib_copy_drawable_to_image",tolua_imlib2_imlib_copy_drawable_to_image00);
6823   tolua_function(tolua_S,"imlib_clone_image",tolua_imlib2_imlib_clone_image00);
6824   tolua_function(tolua_S,"imlib_create_cropped_image",tolua_imlib2_imlib_create_cropped_image00);
6825   tolua_function(tolua_S,"imlib_create_cropped_scaled_image",tolua_imlib2_imlib_create_cropped_scaled_image00);
6826   tolua_function(tolua_S,"imlib_updates_clone",tolua_imlib2_imlib_updates_clone00);
6827   tolua_function(tolua_S,"imlib_update_append_rect",tolua_imlib2_imlib_update_append_rect00);
6828   tolua_function(tolua_S,"imlib_updates_merge",tolua_imlib2_imlib_updates_merge00);
6829   tolua_function(tolua_S,"imlib_updates_merge_for_rendering",tolua_imlib2_imlib_updates_merge_for_rendering00);
6830   tolua_function(tolua_S,"imlib_updates_free",tolua_imlib2_imlib_updates_free00);
6831   tolua_function(tolua_S,"imlib_updates_get_next",tolua_imlib2_imlib_updates_get_next00);
6832   tolua_function(tolua_S,"imlib_updates_get_coordinates",tolua_imlib2_imlib_updates_get_coordinates00);
6833   tolua_function(tolua_S,"imlib_updates_set_coordinates",tolua_imlib2_imlib_updates_set_coordinates00);
6834   tolua_function(tolua_S,"imlib_render_image_updates_on_drawable",tolua_imlib2_imlib_render_image_updates_on_drawable00);
6835   tolua_function(tolua_S,"imlib_updates_init",tolua_imlib2_imlib_updates_init00);
6836   tolua_function(tolua_S,"imlib_updates_append_updates",tolua_imlib2_imlib_updates_append_updates00);
6837   tolua_function(tolua_S,"imlib_image_flip_horizontal",tolua_imlib2_imlib_image_flip_horizontal00);
6838   tolua_function(tolua_S,"imlib_image_flip_vertical",tolua_imlib2_imlib_image_flip_vertical00);
6839   tolua_function(tolua_S,"imlib_image_flip_diagonal",tolua_imlib2_imlib_image_flip_diagonal00);
6840   tolua_function(tolua_S,"imlib_image_orientate",tolua_imlib2_imlib_image_orientate00);
6841   tolua_function(tolua_S,"imlib_image_blur",tolua_imlib2_imlib_image_blur00);
6842   tolua_function(tolua_S,"imlib_image_sharpen",tolua_imlib2_imlib_image_sharpen00);
6843   tolua_function(tolua_S,"imlib_image_tile_horizontal",tolua_imlib2_imlib_image_tile_horizontal00);
6844   tolua_function(tolua_S,"imlib_image_tile_vertical",tolua_imlib2_imlib_image_tile_vertical00);
6845   tolua_function(tolua_S,"imlib_image_tile",tolua_imlib2_imlib_image_tile00);
6846   tolua_function(tolua_S,"imlib_load_font",tolua_imlib2_imlib_load_font00);
6847   tolua_function(tolua_S,"imlib_free_font",tolua_imlib2_imlib_free_font00);
6848 /*  tolua_function(tolua_S,"imlib_insert_font_into_fallback_chain",tolua_imlib2_imlib_insert_font_into_fallback_chain00);
6849   tolua_function(tolua_S,"imlib_remove_font_from_fallback_chain",tolua_imlib2_imlib_remove_font_from_fallback_chain00);
6850   tolua_function(tolua_S,"imlib_get_prev_font_in_fallback_chain",tolua_imlib2_imlib_get_prev_font_in_fallback_chain00);
6851   tolua_function(tolua_S,"imlib_get_next_font_in_fallback_chain",tolua_imlib2_imlib_get_next_font_in_fallback_chain00);*/
6852   tolua_function(tolua_S,"imlib_text_draw",tolua_imlib2_imlib_text_draw00);
6853   tolua_function(tolua_S,"imlib_text_draw_with_return_metrics",tolua_imlib2_imlib_text_draw_with_return_metrics00);
6854   tolua_function(tolua_S,"imlib_get_text_size",tolua_imlib2_imlib_get_text_size00);
6855   tolua_function(tolua_S,"imlib_get_text_advance",tolua_imlib2_imlib_get_text_advance00);
6856   tolua_function(tolua_S,"imlib_get_text_inset",tolua_imlib2_imlib_get_text_inset00);
6857   tolua_function(tolua_S,"imlib_add_path_to_font_path",tolua_imlib2_imlib_add_path_to_font_path00);
6858   tolua_function(tolua_S,"imlib_remove_path_from_font_path",tolua_imlib2_imlib_remove_path_from_font_path00);
6859   tolua_function(tolua_S,"imlib_list_font_path",tolua_imlib2_imlib_list_font_path00);
6860   tolua_function(tolua_S,"imlib_text_get_index_and_location",tolua_imlib2_imlib_text_get_index_and_location00);
6861   tolua_function(tolua_S,"imlib_text_get_location_at_index",tolua_imlib2_imlib_text_get_location_at_index00);
6862   tolua_function(tolua_S,"imlib_list_fonts",tolua_imlib2_imlib_list_fonts00);
6863   tolua_function(tolua_S,"imlib_free_font_list",tolua_imlib2_imlib_free_font_list00);
6864   tolua_function(tolua_S,"imlib_get_font_cache_size",tolua_imlib2_imlib_get_font_cache_size00);
6865   tolua_function(tolua_S,"imlib_set_font_cache_size",tolua_imlib2_imlib_set_font_cache_size00);
6866   tolua_function(tolua_S,"imlib_flush_font_cache",tolua_imlib2_imlib_flush_font_cache00);
6867   tolua_function(tolua_S,"imlib_get_font_ascent",tolua_imlib2_imlib_get_font_ascent00);
6868   tolua_function(tolua_S,"imlib_get_font_descent",tolua_imlib2_imlib_get_font_descent00);
6869   tolua_function(tolua_S,"imlib_get_maximum_font_ascent",tolua_imlib2_imlib_get_maximum_font_ascent00);
6870   tolua_function(tolua_S,"imlib_get_maximum_font_descent",tolua_imlib2_imlib_get_maximum_font_descent00);
6871   tolua_function(tolua_S,"imlib_create_color_modifier",tolua_imlib2_imlib_create_color_modifier00);
6872   tolua_function(tolua_S,"imlib_free_color_modifier",tolua_imlib2_imlib_free_color_modifier00);
6873   tolua_function(tolua_S,"imlib_modify_color_modifier_gamma",tolua_imlib2_imlib_modify_color_modifier_gamma00);
6874   tolua_function(tolua_S,"imlib_modify_color_modifier_brightness",tolua_imlib2_imlib_modify_color_modifier_brightness00);
6875   tolua_function(tolua_S,"imlib_modify_color_modifier_contrast",tolua_imlib2_imlib_modify_color_modifier_contrast00);
6876   tolua_function(tolua_S,"imlib_set_color_modifier_tables",tolua_imlib2_imlib_set_color_modifier_tables00);
6877   tolua_function(tolua_S,"imlib_get_color_modifier_tables",tolua_imlib2_imlib_get_color_modifier_tables00);
6878   tolua_function(tolua_S,"imlib_reset_color_modifier",tolua_imlib2_imlib_reset_color_modifier00);
6879   tolua_function(tolua_S,"imlib_apply_color_modifier",tolua_imlib2_imlib_apply_color_modifier00);
6880   tolua_function(tolua_S,"imlib_apply_color_modifier_to_rectangle",tolua_imlib2_imlib_apply_color_modifier_to_rectangle00);
6881   tolua_function(tolua_S,"imlib_image_draw_pixel",tolua_imlib2_imlib_image_draw_pixel00);
6882   tolua_function(tolua_S,"imlib_image_draw_line",tolua_imlib2_imlib_image_draw_line00);
6883   tolua_function(tolua_S,"imlib_image_draw_rectangle",tolua_imlib2_imlib_image_draw_rectangle00);
6884   tolua_function(tolua_S,"imlib_image_fill_rectangle",tolua_imlib2_imlib_image_fill_rectangle00);
6885   tolua_function(tolua_S,"imlib_image_copy_alpha_to_image",tolua_imlib2_imlib_image_copy_alpha_to_image00);
6886   tolua_function(tolua_S,"imlib_image_copy_alpha_rectangle_to_image",tolua_imlib2_imlib_image_copy_alpha_rectangle_to_image00);
6887   tolua_function(tolua_S,"imlib_image_scroll_rect",tolua_imlib2_imlib_image_scroll_rect00);
6888   tolua_function(tolua_S,"imlib_image_copy_rect",tolua_imlib2_imlib_image_copy_rect00);
6889   tolua_function(tolua_S,"imlib_polygon_new",tolua_imlib2_imlib_polygon_new00);
6890   tolua_function(tolua_S,"imlib_polygon_free",tolua_imlib2_imlib_polygon_free00);
6891   tolua_function(tolua_S,"imlib_polygon_add_point",tolua_imlib2_imlib_polygon_add_point00);
6892   tolua_function(tolua_S,"imlib_image_draw_polygon",tolua_imlib2_imlib_image_draw_polygon00);
6893   tolua_function(tolua_S,"imlib_image_fill_polygon",tolua_imlib2_imlib_image_fill_polygon00);
6894   tolua_function(tolua_S,"imlib_polygon_get_bounds",tolua_imlib2_imlib_polygon_get_bounds00);
6895   tolua_function(tolua_S,"imlib_polygon_contains_point",tolua_imlib2_imlib_polygon_contains_point00);
6896   tolua_function(tolua_S,"imlib_image_draw_ellipse",tolua_imlib2_imlib_image_draw_ellipse00);
6897   tolua_function(tolua_S,"imlib_image_fill_ellipse",tolua_imlib2_imlib_image_fill_ellipse00);
6898   tolua_function(tolua_S,"imlib_create_color_range",tolua_imlib2_imlib_create_color_range00);
6899   tolua_function(tolua_S,"imlib_free_color_range",tolua_imlib2_imlib_free_color_range00);
6900   tolua_function(tolua_S,"imlib_add_color_to_color_range",tolua_imlib2_imlib_add_color_to_color_range00);
6901   tolua_function(tolua_S,"imlib_image_fill_color_range_rectangle",tolua_imlib2_imlib_image_fill_color_range_rectangle00);
6902   tolua_function(tolua_S,"imlib_image_fill_hsva_color_range_rectangle",tolua_imlib2_imlib_image_fill_hsva_color_range_rectangle00);
6903   tolua_function(tolua_S,"imlib_image_attach_data_value",tolua_imlib2_imlib_image_attach_data_value00);
6904   tolua_function(tolua_S,"imlib_image_get_attached_data",tolua_imlib2_imlib_image_get_attached_data00);
6905   tolua_function(tolua_S,"imlib_image_get_attached_value",tolua_imlib2_imlib_image_get_attached_value00);
6906   tolua_function(tolua_S,"imlib_image_remove_attached_data_value",tolua_imlib2_imlib_image_remove_attached_data_value00);
6907   tolua_function(tolua_S,"imlib_image_remove_and_free_attached_data_value",tolua_imlib2_imlib_image_remove_and_free_attached_data_value00);
6908   tolua_function(tolua_S,"imlib_save_image",tolua_imlib2_imlib_save_image00);
6909   tolua_function(tolua_S,"imlib_save_image_with_error_return",tolua_imlib2_imlib_save_image_with_error_return00);
6910   tolua_function(tolua_S,"imlib_create_rotated_image",tolua_imlib2_imlib_create_rotated_image00);
6911   tolua_function(tolua_S,"imlib_rotate_image_from_buffer",tolua_imlib2_imlib_rotate_image_from_buffer00);
6912   tolua_function(tolua_S,"imlib_blend_image_onto_image_at_angle",tolua_imlib2_imlib_blend_image_onto_image_at_angle00);
6913   tolua_function(tolua_S,"imlib_blend_image_onto_image_skewed",tolua_imlib2_imlib_blend_image_onto_image_skewed00);
6914   tolua_function(tolua_S,"imlib_render_image_on_drawable_skewed",tolua_imlib2_imlib_render_image_on_drawable_skewed00);
6915   tolua_function(tolua_S,"imlib_render_image_on_drawable_at_angle",tolua_imlib2_imlib_render_image_on_drawable_at_angle00);
6916   tolua_function(tolua_S,"imlib_image_filter",tolua_imlib2_imlib_image_filter00);
6917   tolua_function(tolua_S,"imlib_create_filter",tolua_imlib2_imlib_create_filter00);
6918   tolua_function(tolua_S,"imlib_context_set_filter",tolua_imlib2_imlib_context_set_filter00);
6919   tolua_function(tolua_S,"imlib_context_get_filter",tolua_imlib2_imlib_context_get_filter00);
6920   tolua_function(tolua_S,"imlib_free_filter",tolua_imlib2_imlib_free_filter00);
6921   tolua_function(tolua_S,"imlib_filter_set",tolua_imlib2_imlib_filter_set00);
6922   tolua_function(tolua_S,"imlib_filter_set_alpha",tolua_imlib2_imlib_filter_set_alpha00);
6923   tolua_function(tolua_S,"imlib_filter_set_red",tolua_imlib2_imlib_filter_set_red00);
6924   tolua_function(tolua_S,"imlib_filter_set_green",tolua_imlib2_imlib_filter_set_green00);
6925   tolua_function(tolua_S,"imlib_filter_set_blue",tolua_imlib2_imlib_filter_set_blue00);
6926   tolua_function(tolua_S,"imlib_filter_constants",tolua_imlib2_imlib_filter_constants00);
6927   tolua_function(tolua_S,"imlib_filter_divisors",tolua_imlib2_imlib_filter_divisors00);
6928   tolua_function(tolua_S,"imlib_image_clear",tolua_imlib2_imlib_image_clear00);
6929   tolua_function(tolua_S,"imlib_image_clear_color",tolua_imlib2_imlib_image_clear_color00);
6930  tolua_endmodule(tolua_S);
6931  return 1;
6932 }
6933
6934
6935 #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
6936  TOLUA_API int luaopen_imlib2 (lua_State* tolua_S) {
6937  return tolua_imlib2_open(tolua_S);
6938 };
6939 #endif
6940