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