예제 #1
0
/**
 * @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;
}
예제 #2
0
/**
 * @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;
}
예제 #3
0
/**
 * @internal
 * @brief Gets the type of an Etk_String
 * @return Returns the type of an Etk_String
 */
Etk_Type *etk_string_type_get(void)
{
   static Etk_Type *string_type = NULL;

   if (!string_type)
   {
      string_type = etk_type_new("Etk_String", ETK_OBJECT_TYPE, sizeof(Etk_String),
            ETK_CONSTRUCTOR(_etk_string_constructor), ETK_DESTRUCTOR(_etk_string_destructor), NULL);
      etk_type_property_add(string_type, "string", ETK_STRING_STRING_PROPERTY,
            ETK_PROPERTY_STRING, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_string(NULL));
      
      string_type->property_set = _etk_string_property_set;
      string_type->property_get = _etk_string_property_get;
   }

   return string_type;
}
예제 #4
0
/**
 * @internal
 * @brief Gets the type of an Etk_Menu_Item_Radio
 * @return Returns the type of an Etk_Menu_Item_Radio
 */
Etk_Type *etk_menu_item_radio_type_get(void)
{
   static Etk_Type *menu_item_radio_type = NULL;

   if (!menu_item_radio_type)
   {
      menu_item_radio_type = etk_type_new("Etk_Menu_Item_Radio", ETK_MENU_ITEM_CHECK_TYPE, sizeof(Etk_Menu_Item_Radio),
         ETK_CONSTRUCTOR(_etk_menu_item_radio_constructor), ETK_DESTRUCTOR(_etk_menu_item_radio_destructor), NULL);

      etk_type_property_add(menu_item_radio_type, "group", ETK_MENU_ITEM_GROUP_PROPERTY,
         ETK_PROPERTY_POINTER, ETK_PROPERTY_READABLE_WRITABLE,  etk_property_value_pointer(NULL));

      menu_item_radio_type->property_set = _etk_menu_item_radio_property_set;
      menu_item_radio_type->property_get = _etk_menu_item_radio_property_get;
   }

   return menu_item_radio_type;
}
예제 #5
0
/**
 * @internal
 * @brief Gets the type of an Etk_Frame
 * @return Returns the type of an Etk_Frame
 */
Etk_Type *etk_frame_type_get(void)
{
   static Etk_Type *frame_type = NULL;

   if (!frame_type)
   {
      frame_type = etk_type_new("Etk_Frame", ETK_BIN_TYPE, sizeof(Etk_Frame),
         ETK_CONSTRUCTOR(_etk_frame_constructor),
         ETK_DESTRUCTOR(_etk_frame_destructor), NULL);

      etk_type_property_add(frame_type, "label", ETK_FRAME_LABEL_PROPERTY,
         ETK_PROPERTY_STRING, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_string(NULL));

      frame_type->property_set = _etk_frame_property_set;
      frame_type->property_get = _etk_frame_property_get;
   }

   return frame_type;
}
예제 #6
0
/**
 * @internal
 * @brief Gets the type of an Etk_Radio_Button
 * @return Returns the type of an Etk_Radio_Button
 */
Etk_Type *etk_radio_button_type_get(void)
{
   static Etk_Type *radio_button_type = NULL;

   if (!radio_button_type)
   {
      radio_button_type = etk_type_new("Etk_Radio_Button", ETK_TOGGLE_BUTTON_TYPE,
         sizeof(Etk_Radio_Button),
         ETK_CONSTRUCTOR(_etk_radio_button_constructor),
         ETK_DESTRUCTOR(_etk_radio_button_destructor), NULL);

      etk_type_property_add(radio_button_type, "group", ETK_RADIO_BUTTON_GROUP_PROPERTY,
            ETK_PROPERTY_POINTER, ETK_PROPERTY_READABLE_WRITABLE,  etk_property_value_pointer(NULL));

      radio_button_type->property_set = _etk_radio_button_property_set;
      radio_button_type->property_get = _etk_radio_button_property_get;
   }

   return radio_button_type;
}
예제 #7
0
/**
 * @internal
 * @brief Gets the type of an Etk_Statusbar
 * @return Returns the type of an Etk_Statusbar
 */
Etk_Type *etk_statusbar_type_get(void)
{
   static Etk_Type *statusbar_type = NULL;

   if (!statusbar_type)
   {
      statusbar_type = etk_type_new("Etk_Statusbar", ETK_WIDGET_TYPE, sizeof(Etk_Statusbar),
         ETK_CONSTRUCTOR(_etk_statusbar_constructor), ETK_DESTRUCTOR(_etk_statusbar_destructor), NULL);

      etk_type_property_add(statusbar_type, "current-message", ETK_STATUSBAR_CURRENT_MESSAGE_PROPERTY,
         ETK_PROPERTY_STRING, ETK_PROPERTY_READABLE, NULL);
      etk_type_property_add(statusbar_type, "has-resize-grip", ETK_STATUSBAR_HAS_RESIZE_GRIP_PROPERTY,
         ETK_PROPERTY_BOOL, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_bool(ETK_TRUE));

      statusbar_type->property_set = _etk_statusbar_property_set;
      statusbar_type->property_get = _etk_statusbar_property_get;
   }

   return statusbar_type;
}
예제 #8
0
/**
 * @internal
 * @brief Gets the type of an Etk_Box
 * @return Returns the type of an Etk_Box
 */
Etk_Type *etk_box_type_get(void)
{
   static Etk_Type *box_type = NULL;

   if (!box_type)
   {
      box_type = etk_type_new("Etk_Box", ETK_CONTAINER_TYPE, sizeof(Etk_Box),
         ETK_CONSTRUCTOR(_etk_box_constructor),
         ETK_DESTRUCTOR(_etk_box_destructor), NULL);

      etk_type_property_add(box_type, "spacing", ETK_BOX_SPACING_PROPERTY,
            ETK_PROPERTY_INT, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_int(0));
      etk_type_property_add(box_type, "homogeneous", ETK_BOX_HOMOGENEOUS_PROPERTY,
            ETK_PROPERTY_BOOL, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_bool(ETK_FALSE));

      box_type->property_set = _etk_box_property_set;
      box_type->property_get = _etk_box_property_get;
   }

   return box_type;
}
예제 #9
0
/**
 * @internal
 * @brief Gets the type of an Etk_Table
 * @return Returns the type of an Etk_Table
 */
Etk_Type *etk_table_type_get(void)
{
   static Etk_Type *table_type = NULL;

   if (!table_type)
   {
      table_type = etk_type_new("Etk_Table", ETK_CONTAINER_TYPE, sizeof(Etk_Table),
            ETK_CONSTRUCTOR(_etk_table_constructor), ETK_DESTRUCTOR(_etk_table_destructor), NULL);

      etk_type_property_add(table_type, "num-cols", ETK_TABLE_NUM_COLS_PROPERTY,
            ETK_PROPERTY_INT, ETK_PROPERTY_READABLE_WRITABLE,  etk_property_value_int(0));
      etk_type_property_add(table_type, "num-rows", ETK_TABLE_NUM_ROWS_PROPERTY,
            ETK_PROPERTY_INT, ETK_PROPERTY_READABLE_WRITABLE,  etk_property_value_int(0));
      etk_type_property_add(table_type, "homogeneous", ETK_TABLE_HOMOGENEOUS_PROPERTY,
            ETK_PROPERTY_INT, ETK_PROPERTY_READABLE_WRITABLE,  etk_property_value_int(ETK_TABLE_NOT_HOMOGENEOUS));

      table_type->property_set = _etk_table_property_set;
      table_type->property_get = _etk_table_property_get;
   }

   return table_type;
}