//FIXME should not be exposed to the user of the language binding, //FIXME but rather used to implement memory management within the language binding // cairo_public unsigned int // cairo_font_face_get_reference_count (cairo_font_face_t *font_face); static int l_cairo_font_face_get_reference_count(lua_State* L) { cairo_font_face_t *font_face = get_cairo_font_face_t (L, 1); unsigned int v = cairo_font_face_get_reference_count (font_face); lua_pushnumber(L, v); return 1; }
// cairo_public cairo_font_type_t // cairo_font_face_get_type (cairo_font_face_t *font_face); static int l_cairo_font_face_get_type(lua_State* L) { cairo_font_face_t *font_face = get_cairo_font_face_t (L, 1); cairo_font_type_t v = cairo_font_face_get_type (font_face); lua_pushinteger(L, v); return 1; }
//FIXME should not be exposed to the user of the language binding, //FIXME but rather used to implement memory management within the language binding // cairo_public cairo_font_face_t * // cairo_font_face_reference (cairo_font_face_t *font_face); static int l_cairo_font_face_reference(lua_State* L) { cairo_font_face_t *font_face = get_cairo_font_face_t (L, 1); cairo_font_face_t *v = cairo_font_face_reference (font_face); lua_pushlightuserdata(L, v); return 1; }
static int new_Win32ScaledFont (lua_State *L) { cairo_font_face_t *font_face; const cairo_matrix_t *font_matrix; const cairo_matrix_t *ctm; const cairo_font_options_t *options; cairo_scaled_font_t *sf; lua_remove(L, 1); // remove cairo.Win32ScaledFont font_face = get_cairo_font_face_t (L, 1); font_matrix = get_cairo_matrix_t (L, 2); ctm = get_cairo_matrix_t (L, 3); options = get_cairo_font_options_t (L, 4); sf = cairo_scaled_font_create (font_face, font_matrix, ctm, options); return new_ScaledFont(L, LUACAIRO ".Win32ScaledFont.mt", sf, 1, 1); }