Skip to content

figure_c_native ​

figure_c_native, the raw C interfaces of FIGURE's native glue (native/figure_native.h).

Private to the library: applications use figure_app, figure_imgui and figure_implot. The glue owns the platform (window, OpenGL context) and calls the cimgui/cimplot functions Fortran cannot call directly (structs larger than ImVec2 passed by value); the direct ones are generated in figure_cimgui and figure_cimplot. Strings passed to the glue are (pointer, length), not NUL-terminated.

Source: src/lib/figure_c_native.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
FIG_OKinteger(kind=c_int)parameterSuccess.
FIG_ERR_STATEinteger(kind=c_int)parameterCall not allowed in the current state.
FIG_ERR_ARGUMENTinteger(kind=c_int)parameterInvalid argument.
FIG_ERR_FAILEDinteger(kind=c_int)parameterThe platform (SDL, OpenGL) reported a failure.
FIG_ERR_EXCEPTIONinteger(kind=c_int)parameterA C++ exception was caught at the boundary.

Derived Types ​

fig_item_status ​

The status of the item drawn last, as native/figure_native.h's fig_item_status: 1 or 0 each.

Attributes: bind(C)

Components

NameTypeAttributesDescription
hoveredinteger(kind=c_int)IsItemHovered.
activeinteger(kind=c_int)IsItemActive.
focusedinteger(kind=c_int)IsItemFocused.
visibleinteger(kind=c_int)IsItemVisible.
activatedinteger(kind=c_int)IsItemActivated.
editedinteger(kind=c_int)IsItemEdited.
deactivatedinteger(kind=c_int)IsItemDeactivated.
deactivated_after_editinteger(kind=c_int)IsItemDeactivatedAfterEdit.
toggled_openinteger(kind=c_int)IsItemToggledOpen.
clickedinteger(kind=c_int)IsItemClicked, per button (left, right, middle).
double_clickedinteger(kind=c_int)Double-clicked over the item, per button.
rectreal(kind=c_double)x, y, width, height [pixels].

fig_canvas_event ​

The event of a canvas in a frame, as native/figure_native.h's fig_canvas_event: flags 1 or 0, per button (left, right, middle).

Attributes: bind(C)

Components

NameTypeAttributesDescription
hoveredinteger(kind=c_int)The pointer is over it.
activeinteger(kind=c_int)A button pressed over it is held.
clickedinteger(kind=c_int)Pressed over it on this frame.
double_clickedinteger(kind=c_int)Double-clicked over it on this frame.
downinteger(kind=c_int)Held, pressed over it.
releasedinteger(kind=c_int)Released on this frame, pressed over it.
ctrlinteger(kind=c_int)Ctrl held.
shiftinteger(kind=c_int)Shift held.
altinteger(kind=c_int)Alt held.
superinteger(kind=c_int)Super (cmd, windows key) held.
mousereal(kind=c_double)The pointer from the canvas's top-left [pixels].
dragreal(kind=c_double)The pointer from where the held button was pressed [pixels].
deltareal(kind=c_double)The pointer's motion this frame, while held [pixels].
wheelreal(kind=c_double)Vertical wheel steps this frame, while hovered.
wheel_hreal(kind=c_double)Horizontal wheel steps this frame, while hovered.
originreal(kind=c_double)The canvas's top-left on the screen [pixels].
sizereal(kind=c_double)Its width and height [pixels].

Interfaces ​

fig_init ​

fig_init_headless ​

fig_init_remote ​

fig_begin_frame ​

fig_end_frame ​

fig_set_ini_file ​

fig_set_style ​

fig_set_style_parts ​

fig_palette_color ​

fig_input_system_theme ​

fig_frame_options ​

fig_set_icon_rgba ​

fig_set_icon_glyph ​

fig_process_start ​

fig_process_pending ​

fig_process_take ​

fig_process_info ​

fig_process_kill ​

fig_notify ​

fig_notification_count ​

fig_notification_get ​

fig_notification_rect ​

fig_notification_alpha ​

fig_drawn_extent ​

fig_drawn_extent_rgba ​

fig_popup_rect ​

fig_task_start ​

fig_task_state ​

fig_task_report ​

fig_task_fail ​

fig_task_cancel ​

fig_task_cancelled ​

fig_task_finish ​

fig_task_on_worker ​

fig_task_refuse ​

fig_set_checks ​

fig_checks ​

fig_draw_refuse ​

fig_usage_error ​

fig_add_fallback_font ​

fig_test_glyph ​

fig_time ​

fig_make_folder ​

fig_remove ​

fig_set_file_time ​

fig_file_time ​

fig_file_exists ​

fig_dnd_source ​

fig_dnd_target ​

fig_dnd_plot_target ​

fig_dnd_dragging ​

fig_aligned_open ​

fig_multi_select_begin ​

fig_multi_select_item ​

fig_plot3d_mouse_ray ​

fig_scope_close ​

fig_scope_report ​

fig_frame_hit ​

fig_frame_rect ​

fig_frame_state ​

fig_remote_token ​

fig_file_dialog ​

fig_file_dialog_result ​

fig_file_browser ​

fig_file_browser_settings ​

fig_file_browser_get ​

fig_file_browser_rect ​

fig_save_image ​

fig_image_result ​

fig_test_capture ​

fig_render_threads ​

fig_save_layout ​

fig_begin_side_bar ​

fig_tool_button ​

fig_clipper_new ​

fig_clipper_step ​

fig_table_sort ​

fig_table_row_color ​

fig_table_column_enabled ​

fig_table_hovered_column ​

fig_load_layout ​

fig_quit_requested ​

fig_set_title ​

fig_title ​

fig_input_quit ​

fig_content_scale ​

fig_last_error ​

fig_texture_create ​

fig_texture_update ​

fig_image_read ​

fig_image_write ​

fig_load_style ​

fig_save_style ​

fig_push_style_color ​

fig_push_style_var ​

fig_pop_style ​

fig_set_font ​

fig_push_font ​

fig_pop_font ​

fig_show_style_editor ​

fig_style_color ​

fig_style_var ​

fig_set_docking ​

fig_dock_id ​

fig_dock_space ​

fig_dock_layout_begin ​

fig_dock_split ​

fig_dock_window ​

fig_dock_layout_end ​

fig_window_dock ​

fig_input_next_frame ​

fig_input_mouse_pos ​

fig_input_mouse_button ​

fig_input_wheel ​

fig_input_key ​

fig_input_text ​

fig_plot_tick_label ​

fig_plot_annotation ​

fig_plot_tag ​

fig_shortcut ​

fig_set_next_item_shortcut ​

fig_last_item ​

fig_drag_range ​

fig_list_box ​

fig_plot_state ​

fig_plot3d_colormap ​

fig_plot3d_axis_format ​

fig_plot3d_state ​

fig_align_begin ​

fig_widget_input_text ​

fig_text_set ​

fig_text_get ​

fig_text_length ​

fig_widget_input_text_multiline ​

fig_input_drop ​

fig_dropped ​

fig_dropped_path ​

fig_set_clipboard ​

fig_get_clipboard ​

fig_opened_url ​

fig_items_record ​

fig_item_find ​

fig_item_value ​

fig_items_list ​

fig_item_click ​

fig_item_type ​

fig_menu_click ​

fig_test_run ​

fig_window_rect ​

fig_colormap ​

fig_colormap_legend ​

fig_field_image ​

fig_field_uploads ​

fig_field_count ​

fig_field_time ​

fig_field_pixel ​

fig_load_colormap ​

fig_colormap_count ​

fig_colormap_name ​

fig_gradient_edit ​

fig_colormap_stops ​

fig_canvas ​

fig_draw ​

fig_invisible_button ​

fig_drawn_extent_layer ​

fig_window_add ​

fig_window_visible ​

fig_window_set_visible ​

fig_window_open_flag ​

fig_view_menu ​

fig_layout_add ​

fig_layout_switch ​

fig_layout_reset ​

fig_layout_current ​

fig_prefs_open ​

fig_prefs_file ​

fig_pref_set ​

fig_pref_get ​

fig_message_box ​

fig_splitter ​

fig_set_size_limits ​

fig_shutdown ​

fig_process_release ​

fig_task_release ​

fig_dnd_payload ​

fig_multi_select_end ​

fig_clipper_include ​

fig_scope_open ​

fig_set_lazy ​

fig_set_remote_fps ​

fig_set_remote_compress ​

fig_set_remote_lossy ​

fig_set_remote_token ​

fig_clipper_begin ​

fig_clipper_delete ​

fig_set_confirm_quit ​

fig_quit ​

fig_app_wake ​

fig_request_frames ​

fig_set_last_error ​

fig_texture_destroy ​

fig_image_free ​

fig_texture_sampling ​

fig_mark_last_item_edited ​

fig_plot_end ​

fig_plot3d_end ​

fig_plot_axis_constraints ​

fig_align_end ​

fig_align_next ​

fig_text_release ​

fig_items_name ​

fig_items_tooltip ​

fig_input_mouse ​

fig_cursor_screen_pos ​

Released under the MIT licence.