luascript.c File Reference

#include "luascript.h"
#include "../lib/ubasic/camera_functions.h"
#include "kbd.h"
#include "platform.h"
#include "script.h"
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#include "../include/conf.h"
#include "shot_histogram.h"
#include "ubasic.h"
#include "stdlib.h"
#include "raw.h"
#include "raw_merge.h"

Include dependency graph for luascript.c:

Go to the source code of this file.

Defines

#define FUNC(X)

Functions

void register_lua_funcs (lua_State *L)


Define Documentation

#define FUNC (  ) 

Value:

lua_pushcfunction( L, luaCB_##X );      \
  lua_setglobal( L, #X )


Function Documentation

void register_lua_funcs ( lua_State L  ) 

Definition at line 884 of file luascript.c.

00885 {
00886 #define FUNC( X )                       \
00887   lua_pushcfunction( L, luaCB_##X );    \
00888   lua_setglobal( L, #X )
00889 
00890   FUNC(shoot);
00891   FUNC(sleep);
00892   FUNC(cls);
00893 
00894   lua_pushlightuserdata( L, kbd_sched_click );
00895   lua_pushcclosure( L, luaCB_keyfunc, 1 );
00896   lua_setglobal( L, "click" );
00897 
00898   lua_pushlightuserdata( L, kbd_sched_press );
00899   lua_pushcclosure( L, luaCB_keyfunc, 1 );
00900   lua_setglobal( L, "press" );
00901 
00902   lua_pushlightuserdata( L, kbd_sched_release );
00903   lua_pushcclosure( L, luaCB_keyfunc, 1 );
00904   lua_setglobal( L, "release" );
00905 
00906   FUNC(get_av96);
00907   FUNC(get_av96);
00908   FUNC(get_bv96);
00909   FUNC(get_day_seconds);
00910   FUNC(get_disk_size);
00911   FUNC(get_dof);
00912   FUNC(get_far_limit);
00913   FUNC(get_free_disk_space);
00914   FUNC(get_focus);
00915   FUNC(get_hyp_dist);
00916   FUNC(get_iso_market);
00917   FUNC(get_iso_mode);
00918   FUNC(get_iso_real);
00919   FUNC(get_jpg_count);
00920   FUNC(get_near_limit);
00921   FUNC(get_prop);
00922   FUNC(get_raw_count);
00923   FUNC(get_raw_nr);
00924   FUNC(get_raw);
00925   FUNC(get_sv96);
00926   FUNC(get_tick_count);
00927   FUNC(get_tv96);
00928   FUNC(get_user_av_id);
00929   FUNC(get_user_av96);
00930   FUNC(get_user_tv_id);
00931   FUNC(get_user_tv96);
00932   FUNC(get_vbatt);
00933   FUNC(get_zoom);
00934   FUNC(get_exp_count);
00935   FUNC(get_flash_params_count);
00936   FUNC(get_parameter_data);
00937 
00938   FUNC(set_av96_direct);
00939   FUNC(set_av96);
00940   FUNC(set_focus);
00941   FUNC(set_iso_mode);
00942   FUNC(set_iso_real);
00943   FUNC(set_led);
00944   FUNC(set_nd_filter);
00945   FUNC(set_prop);
00946   FUNC(set_raw_nr);
00947   FUNC(set_raw);
00948   FUNC(set_sv96);
00949   FUNC(set_tv96_direct);
00950   FUNC(set_tv96);
00951   FUNC(set_user_av_by_id_rel);
00952   FUNC(set_user_av_by_id);
00953   FUNC(set_user_av96);
00954   FUNC(set_user_tv_by_id_rel);
00955   FUNC(set_user_tv_by_id);
00956   FUNC(set_user_tv96);
00957   FUNC(set_zoom_speed);
00958   FUNC(set_zoom_rel);
00959   FUNC(set_zoom);
00960 
00961   FUNC(wait_click);
00962   FUNC(is_pressed);
00963   FUNC(is_key);
00964 #ifdef CAM_HAS_JOGDIAL
00965   FUNC(wheel_right);
00966   FUNC(wheel_left);
00967 #endif
00968   FUNC(md_get_cell_diff);
00969   FUNC(md_detect_motion);
00970   FUNC(autostarted);
00971   FUNC(get_autostart);
00972   FUNC(set_autostart);
00973   FUNC(get_usb_power);
00974   FUNC(exit_alt);
00975   FUNC(shut_down);
00976   FUNC(print_screen);
00977 
00978   FUNC(get_focus_mode);
00979   FUNC(get_propset);
00980   FUNC(get_zoom_steps);
00981   FUNC(get_drive_mode);
00982   FUNC(get_flash_mode);
00983   FUNC(get_shooting);
00984   FUNC(get_flash_ready);
00985   FUNC(get_IS_mode);
00986   FUNC(set_ev);
00987   FUNC(get_ev);
00988   FUNC(get_orientation_sensor);
00989   FUNC(get_nd_present);
00990   FUNC(get_movie_status);
00991   FUNC(set_movie_status);
00992   
00993   FUNC(get_histo_range);
00994   FUNC(shot_histo_enable);
00995   FUNC(play_sound);
00996   FUNC(get_temperature);
00997   FUNC(peek);
00998   FUNC(poke);
00999   FUNC(bitand);
01000   FUNC(bitor);
01001   FUNC(bitxor);
01002   FUNC(bitshl);
01003   FUNC(bitshri);
01004   FUNC(bitshru);
01005   FUNC(bitnot);
01006 
01007   FUNC(get_time);
01008 
01009   FUNC(get_buildinfo);
01010   FUNC(get_mode);
01011   
01012   FUNC(set_raw_develop);
01013   // NOTE these functions normally run in the spytask.
01014   // called from lua they will run from kbd task instead
01015   FUNC(raw_merge_start);
01016   FUNC(raw_merge_add_file);
01017   FUNC(raw_merge_end);
01018   FUNC(set_backlight);
01019    FUNC(set_aflock);
01020 #ifdef OPT_CURVES
01021    FUNC(set_curve_state);
01022 #endif
01023 }


Generated on Wed Jun 17 02:00:40 2009 for CHDK out of SVN by  doxygen 1.5.6