/** * @internal * @brief Gets the type of an Etk_Menu_Item * @return Returns the type of an Etk_Menu_Item */ Etk_Type *etk_menu_item_type_get(void) { static Etk_Type *menu_item_type = NULL; if (!menu_item_type) { const Etk_Signal_Description signals[] = { ETK_SIGNAL_DESC_HANDLER(ETK_MENU_ITEM_SELECTED_SIGNAL, "selected", Etk_Menu_Item, selected_handler, etk_marshaller_VOID), ETK_SIGNAL_DESC_HANDLER(ETK_MENU_ITEM_UNSELECTED_SIGNAL, "unselected", Etk_Menu_Item, unselected_handler, etk_marshaller_VOID), ETK_SIGNAL_DESC_HANDLER(ETK_MENU_ITEM_ACTIVATED_SIGNAL, "activated", Etk_Menu_Item, activated_handler, etk_marshaller_VOID), ETK_SIGNAL_DESCRIPTION_SENTINEL }; menu_item_type = etk_type_new("Etk_Menu_Item", ETK_WIDGET_TYPE, sizeof(Etk_Menu_Item), ETK_CONSTRUCTOR(_etk_menu_item_constructor), ETK_DESTRUCTOR(_etk_menu_item_destructor), signals); etk_type_property_add(menu_item_type, "label", ETK_MENU_ITEM_LABEL_PROPERTY, ETK_PROPERTY_STRING, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_string(NULL)); etk_type_property_add(menu_item_type, "submenu", ETK_MENU_ITEM_SUBMENU_PROPERTY, ETK_PROPERTY_OBJECT, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_object(NULL)); menu_item_type->property_set = _etk_menu_item_property_set; menu_item_type->property_get = _etk_menu_item_property_get; } return menu_item_type; }
/** * @internal * @brief Gets the type of an Etk_Cairo * @return Returns the type of an Etk_Cairo */ Etk_Type *etk_cairo_type_get(void) { static Etk_Type *cairo_type = NULL; if (!cairo_type) { const Etk_Signal_Description signals[] = { ETK_SIGNAL_DESC_HANDLER(ETK_CAIRO_REDRAW_REQUIRED_SIGNAL, "redraw-required", Etk_Cairo, redraw_required_handler, etk_marshaller_VOID), ETK_SIGNAL_DESCRIPTION_SENTINEL }; cairo_type = etk_type_new("Etk_Cairo", ETK_WIDGET_TYPE, sizeof(Etk_Cairo), ETK_CONSTRUCTOR(_etk_cairo_constructor), ETK_DESTRUCTOR(_etk_cairo_destructor), signals); etk_type_property_add(cairo_type, "min-width", ETK_CAIRO_MIN_WIDTH_PROPERTY, ETK_PROPERTY_INT, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_int(0)); etk_type_property_add(cairo_type, "min-height", ETK_CAIRO_MIN_HEIGHT_PROPERTY, ETK_PROPERTY_INT, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_int(0)); cairo_type->property_set = _etk_cairo_property_set; cairo_type->property_get = _etk_cairo_property_get; } return cairo_type; }
/** * @internal * @brief Gets the type of an Etk_Menu_Item_Check * @return Returns the type of an Etk_Menu_Item_Check */ Etk_Type *etk_menu_item_check_type_get(void) { static Etk_Type *menu_item_check_type = NULL; if (!menu_item_check_type) { const Etk_Signal_Description signals[] = { ETK_SIGNAL_DESC_HANDLER(ETK_MENU_ITEM_CHECK_TOGGLED_SIGNAL, "toggled", Etk_Menu_Item_Check, toggled_handler, etk_marshaller_VOID), ETK_SIGNAL_DESCRIPTION_SENTINEL }; menu_item_check_type = etk_type_new("Etk_Menu_Item_Check", ETK_MENU_ITEM_TYPE, sizeof(Etk_Menu_Item_Check), ETK_CONSTRUCTOR(_etk_menu_item_check_constructor), NULL, signals); etk_type_property_add(menu_item_check_type, "active", ETK_MENU_ITEM_ACTIVE_PROPERTY, ETK_PROPERTY_BOOL, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_bool(ETK_FALSE)); menu_item_check_type->property_set = _etk_menu_item_check_property_set; menu_item_check_type->property_get = _etk_menu_item_check_property_get; } return menu_item_check_type; }