Thu, 29 May 2025 14:35:41 +0200
add wrapper functions for container and frame arg structs
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2025 Olaf Wintermann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef UIC_ARGS_H #define UIC_ARGS_H #include "../ui/container.h" #ifdef __cplusplus extern "C" { #endif UIEXPORT UiContainerArgs* ui_container_args_new(void); void ui_container_args_set_fill(UiContainerArgs *args, UiBool fill); void ui_container_args_set_hexpand(UiContainerArgs *args, UiBool value); void ui_container_args_set_vexpand(UiContainerArgs *args, UiBool value); void ui_container_args_set_hfill(UiContainerArgs *args, UiBool value); void ui_container_args_set_vfill(UiContainerArgs *args, UiBool value); void ui_container_args_set_override_defaults(UiContainerArgs *args, UiBool value); void ui_container_args_set_colspan(UiContainerArgs *args, int colspan); void ui_container_args_set_rolspan(UiContainerArgs *args, int rowspan); void ui_container_args_set_def_hexpand(UiContainerArgs *args, UiBool value); void ui_container_args_set_def_vexpand(UiContainerArgs *args, UiBool value); void ui_container_args_set_def_hfill(UiContainerArgs *args, UiBool value); void ui_container_args_set_def_vfill(UiContainerArgs *args, UiBool value); void ui_container_args_set_name(UiContainerArgs *args, const char *name); void ui_container_args_set_style_class(UiContainerArgs *args, const char *classname); void ui_container_args_set_margin(UiContainerArgs *args, int value); void ui_container_args_set_spacing(UiContainerArgs *args, int value); void ui_container_args_set_columnspacing(UiContainerArgs *args, int value); void ui_container_args_set_rowspacing(UiContainerArgs *args, int value); void ui_container_args_free(UiContainerArgs *args); UIEXPORT UiFrameArgs* ui_frame_args_new(void); void ui_frame_args_set_fill(UiFrameArgs *args, UiBool fill); void ui_frame_args_set_hexpand(UiFrameArgs *args, UiBool value); void ui_frame_args_set_vexpand(UiFrameArgs *args, UiBool value); void ui_frame_args_set_hfill(UiFrameArgs *args, UiBool value); void ui_frame_args_set_vfill(UiFrameArgs *args, UiBool value); void ui_frame_args_set_override_defaults(UiFrameArgs *args, UiBool value); void ui_frame_args_set_colspan(UiFrameArgs *args, int colspan); void ui_frame_args_set_rolspan(UiFrameArgs *args, int rowspan); void ui_frame_args_set_name(UiFrameArgs *args, const char *name); void ui_frame_args_set_style_class(UiFrameArgs *args, const char *classname); void ui_frame_args_set_margin(UiFrameArgs *args, int value); void ui_frame_args_set_spacing(UiFrameArgs *args, int value); void ui_frame_args_set_columnspacing(UiFrameArgs *args, int value); void ui_frame_args_set_rowspacing(UiFrameArgs *args, int value); void ui_frame_args_set_expanded(UiFrameArgs *args, UiBool value); void ui_frame_args_set_label(UiFrameArgs *args, const char *label); void ui_frame_args_free(UiFrameArgs *args); #ifdef __cplusplus } #endif #endif /* UIC_ARGS_H */