whelk/_whelk.h
author J. Ali Harlow <ali@juiblex.co.uk>
Thu Jul 09 08:52:03 2009 +0100 (2009-07-09)
changeset 0 8525965e930d
child 3 47fa028d40b3
permissions -rw-r--r--
Initial checkin
ali@0
     1
#include <lua.h>
ali@0
     2
#include <lualib.h>
ali@0
     3
#ifdef __WIN32__
ali@0
     4
#include <windows.h>
ali@0
     5
#endif
ali@0
     6
#include <whelk/whelk.h>
ali@0
     7
ali@0
     8
#define whelk_reg_const(L,name) \
ali@0
     9
    do { \
ali@0
    10
	lua_pushliteral(L,#name); \
ali@0
    11
	lua_pushnumber(L,name); \
ali@0
    12
	lua_settable(L,-3); \
ali@0
    13
    } while(0)
ali@0
    14
ali@0
    15
int whelk_perror(lua_State *L,const char *s);
ali@0
    16
int whelk_get_folder_path(lua_State *L);
ali@0
    17
void whelk_open_get_folder_path(lua_State *L);
ali@0
    18
void whelk_open_reg_keys(lua_State *L);
ali@0
    19
int whelk_create_short_cut(lua_State *L);
ali@0
    20
ali@0
    21
#ifdef __WIN32__
ali@0
    22
char *whelk_utf16_to_utf8(const WCHAR *ucs2,int len);
ali@0
    23
WCHAR *whelk_utf8_to_utf16(const char *utf8,int len);
ali@0
    24
ali@0
    25
HRESULT whelk_reg_close_key(HKEY key);
ali@0
    26
HRESULT whelk_reg_open_key(HKEY key,const char *subkey,HKEY *out);
ali@0
    27
HRESULT whelk_reg_get_value(HKEY key,const char *subkey,const char *value,
ali@0
    28
  DWORD *type,void **data,DWORD *nb);
ali@0
    29
HRESULT whelk_reg_set_value(HKEY key,const char *subkey,const char *value,
ali@0
    30
  DWORD type,const void *data,int nb);
ali@0
    31
HRESULT whelk_reg_delete_key(HKEY key,const char *subkey);
ali@0
    32
#endif