Skip to content

bindings/fortran/gaspardos_native.f90

Fortran interface or build source. Preserve the repository layout and download the C++ and native sources when building the GUI bridge.

Source files · Download gaspardos_native.f90

! Generated by bindings/fortran/generate.py. Do not edit.
module gaspardos_native
  use iso_c_binding

  implicit none
  type, bind(C) :: GO64_StartInfo
    integer(c_int64_t) :: magic, argc
    type(c_ptr) :: argv
  end type
  type, bind(C) :: GO64_FSInfo
    integer(c_int64_t) :: id, parent_id, bytes, reference_count, metadata_count
    integer(c_int16_t) :: name(128), name_length
    integer(c_int8_t) :: is_directory
  end type
  type, bind(C) :: GO64_SocketAddress
    integer(c_int16_t) :: family, port
    integer(c_int8_t) :: address(4)
  end type
  type, bind(C) :: GO64_WindowOptions
    integer(c_int32_t) :: x, y, width, height, background
    character(kind=c_char) :: title(64)
  end type
  type, bind(C) :: GO64_Drawing
    integer(c_int32_t) :: x, y, width, height, color
    character(kind=c_char) :: text(128)
  end type
  type, bind(C) :: GO64_Blit
    integer(c_int32_t) :: x, y, width, height, stride, format
    type(c_ptr) :: pixels
  end type
  type, bind(C) :: GO64_Event
    integer(c_int32_t) :: type, x, y, width, height, buttons, key, modifiers
  end type
  integer(c_int64_t), parameter :: GO64_RDONLY = 0_c_int64_t
  integer(c_int64_t), parameter :: GO64_WRONLY = 1_c_int64_t
  integer(c_int64_t), parameter :: GO64_RDWR = 2_c_int64_t
  integer(c_int64_t), parameter :: GO64_CREAT = 64_c_int64_t
  integer(c_int64_t), parameter :: GO64_EXCL = 128_c_int64_t
  integer(c_int64_t), parameter :: GO64_TRUNC = 512_c_int64_t
  integer(c_int64_t), parameter :: GO64_APPEND = 1024_c_int64_t
  integer(c_int64_t), parameter :: GO64_AF_INET = 2_c_int64_t
  integer(c_int64_t), parameter :: GO64_STREAM = 1_c_int64_t
  integer(c_int64_t), parameter :: GO64_DGRAM = 2_c_int64_t
  integer(c_int64_t), parameter :: GO64_READY = 100_c_int64_t
  integer(c_int64_t), parameter :: GO64_ERROR = 101_c_int64_t
  integer(c_int64_t), parameter :: GO64_OVERFLOW = 102_c_int64_t
  integer(c_int64_t), parameter :: GO64_BLIT_RGBX8888 = 1_c_int64_t
  integer(c_int64_t), parameter :: GO64_BLIT_TILE = 256_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_TICKS = 0_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_CONSOLE_WRITE = 1_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_YIELD = 2_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_EXIT = 3_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_ALLOC = 4_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FREE = 5_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_OPEN = 100_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_CLOSE = 101_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_READ = 102_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_WRITE = 103_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_SEEK = 104_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_STAT = 105_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_FSTAT = 106_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_MKDIR = 107_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_UNLINK = 108_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_RMDIR = 109_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_TRUNCATE = 110_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_READDIR = 111_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_RENAME = 112_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_FS_FCNTL = 113_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_SOCKET = 120_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_BIND = 121_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_LISTEN = 122_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_ACCEPT = 123_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_CONNECT = 124_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_SEND = 125_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_RECV = 126_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_SENDTO = 127_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_RECVFROM = 128_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_GETSOCKNAME = 129_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_GETPEERNAME = 130_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_SOCKET_CLOSE = 131_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_LOG = 132_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_WINDOW_CREATE = 140_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_WINDOW_DESTROY = 141_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_WINDOW_FILL = 142_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_WINDOW_TEXT = 143_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_WINDOW_EVENT = 144_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_WINDOW_FOCUS = 145_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_WINDOW_BLIT = 146_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_PROCESS_SPAWN = 150_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_PROCESS_READ = 151_c_int64_t
  integer(c_int64_t), parameter :: GO64_SYS_PROCESS_STATUS = 152_c_int64_t
  integer(c_int64_t), parameter :: GO64_START_MAGIC = int(z'474F363441524753', c_int64_t)
  interface
    function GO64_ticks( &
      ) bind(C, name="GO64_ticks") result(r)
      import
      integer(c_int64_t) :: r
    end function GO64_ticks
    function GO64_console_write( &
      buffer, &
      size) bind(C, name="GO64_console_write") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: buffer
      integer(c_int64_t), value :: size
    end function GO64_console_write
    function GO64_yield( &
      ) bind(C, name="GO64_yield") result(r)
      import
      integer(c_int64_t) :: r
    end function GO64_yield
    subroutine GO64_exit( &
      ) bind(C, name="GO64_exit")
      import
    end subroutine GO64_exit
    function GO64_alloc( &
      size) bind(C, name="GO64_alloc") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: size
    end function GO64_alloc
    function GO64_free( &
      pointer) bind(C, name="GO64_free") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: pointer
    end function GO64_free
    function GO64_fs_open( &
      path, &
      flags) bind(C, name="GO64_fs_open") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: path
      integer(c_int64_t), value :: flags
    end function GO64_fs_open
    function GO64_fs_close( &
      fd) bind(C, name="GO64_fs_close") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
    end function GO64_fs_close
    function GO64_fs_read( &
      fd, &
      buffer, &
      size) bind(C, name="GO64_fs_read") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: buffer
      integer(c_int64_t), value :: size
    end function GO64_fs_read
    function GO64_fs_write( &
      fd, &
      buffer, &
      size) bind(C, name="GO64_fs_write") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: buffer
      integer(c_int64_t), value :: size
    end function GO64_fs_write
    function GO64_fs_seek( &
      fd, &
      offset, &
      origin) bind(C, name="GO64_fs_seek") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      integer(c_int64_t), value :: offset
      integer(c_int64_t), value :: origin
    end function GO64_fs_seek
    function GO64_fs_stat( &
      path, &
      info) bind(C, name="GO64_fs_stat") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: path
      type(c_ptr), value :: info
    end function GO64_fs_stat
    function GO64_fs_fstat( &
      fd, &
      info) bind(C, name="GO64_fs_fstat") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: info
    end function GO64_fs_fstat
    function GO64_fs_mkdir( &
      path) bind(C, name="GO64_fs_mkdir") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: path
    end function GO64_fs_mkdir
    function GO64_fs_unlink( &
      path) bind(C, name="GO64_fs_unlink") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: path
    end function GO64_fs_unlink
    function GO64_fs_rmdir( &
      path) bind(C, name="GO64_fs_rmdir") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: path
    end function GO64_fs_rmdir
    function GO64_fs_truncate( &
      fd, &
      size) bind(C, name="GO64_fs_truncate") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      integer(c_int64_t), value :: size
    end function GO64_fs_truncate
    function GO64_fs_readdir( &
      fd, &
      info) bind(C, name="GO64_fs_readdir") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: info
    end function GO64_fs_readdir
    function GO64_fs_rename( &
      oldpath, &
      newpath) bind(C, name="GO64_fs_rename") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: oldpath
      type(c_ptr), value :: newpath
    end function GO64_fs_rename
    function GO64_fs_fcntl( &
      fd, &
      command, &
      flags) bind(C, name="GO64_fs_fcntl") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      integer(c_int64_t), value :: command
      integer(c_int64_t), value :: flags
    end function GO64_fs_fcntl
    function GO64_socket( &
      family, &
      type, &
      protocol) bind(C, name="GO64_socket") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: family
      integer(c_int64_t), value :: type
      integer(c_int64_t), value :: protocol
    end function GO64_socket
    function GO64_bind( &
      fd, &
      address, &
      address_size) bind(C, name="GO64_bind") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: address
      integer(c_int64_t), value :: address_size
    end function GO64_bind
    function GO64_listen( &
      fd, &
      backlog) bind(C, name="GO64_listen") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      integer(c_int64_t), value :: backlog
    end function GO64_listen
    function GO64_accept( &
      fd, &
      address, &
      address_size) bind(C, name="GO64_accept") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: address
      type(c_ptr), value :: address_size
    end function GO64_accept
    function GO64_connect( &
      fd, &
      address, &
      address_size) bind(C, name="GO64_connect") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: address
      integer(c_int64_t), value :: address_size
    end function GO64_connect
    function GO64_send( &
      fd, &
      buffer, &
      size, &
      flags) bind(C, name="GO64_send") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: buffer
      integer(c_int64_t), value :: size
      integer(c_int64_t), value :: flags
    end function GO64_send
    function GO64_recv( &
      fd, &
      buffer, &
      size, &
      flags) bind(C, name="GO64_recv") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: buffer
      integer(c_int64_t), value :: size
      integer(c_int64_t), value :: flags
    end function GO64_recv
    function GO64_sendto( &
      fd, &
      buffer, &
      size, &
      flags, &
      address, &
      address_size) bind(C, name="GO64_sendto") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: buffer
      integer(c_int64_t), value :: size
      integer(c_int64_t), value :: flags
      type(c_ptr), value :: address
      integer(c_int64_t), value :: address_size
    end function GO64_sendto
    function GO64_recvfrom( &
      fd, &
      buffer, &
      size, &
      flags, &
      address, &
      address_size) bind(C, name="GO64_recvfrom") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: buffer
      integer(c_int64_t), value :: size
      integer(c_int64_t), value :: flags
      type(c_ptr), value :: address
      type(c_ptr), value :: address_size
    end function GO64_recvfrom
    function GO64_getsockname( &
      fd, &
      address, &
      address_size) bind(C, name="GO64_getsockname") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: address
      type(c_ptr), value :: address_size
    end function GO64_getsockname
    function GO64_getpeername( &
      fd, &
      address, &
      address_size) bind(C, name="GO64_getpeername") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
      type(c_ptr), value :: address
      type(c_ptr), value :: address_size
    end function GO64_getpeername
    function GO64_socket_close( &
      fd) bind(C, name="GO64_socket_close") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: fd
    end function GO64_socket_close
    function GO64_log( &
      text) bind(C, name="GO64_log") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: text
    end function GO64_log
    function GO64_window_create( &
      options) bind(C, name="GO64_window_create") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: options
    end function GO64_window_create
    function GO64_window_destroy( &
      window) bind(C, name="GO64_window_destroy") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: window
    end function GO64_window_destroy
    function GO64_window_fill( &
      window, &
      drawing) bind(C, name="GO64_window_fill") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: window
      type(c_ptr), value :: drawing
    end function GO64_window_fill
    function GO64_window_text( &
      window, &
      drawing) bind(C, name="GO64_window_text") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: window
      type(c_ptr), value :: drawing
    end function GO64_window_text
    function GO64_window_event( &
      window, &
      event, &
      mode) bind(C, name="GO64_window_event") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: window
      type(c_ptr), value :: event
      integer(c_int64_t), value :: mode
    end function GO64_window_event
    function GO64_window_focus( &
      window) bind(C, name="GO64_window_focus") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: window
    end function GO64_window_focus
    function GO64_window_blit( &
      window, &
      tile) bind(C, name="GO64_window_blit") result(r)
      import
      integer(c_int64_t) :: r
      integer(c_int64_t), value :: window
      type(c_ptr), value :: tile
    end function GO64_window_blit
    function GO64_process_spawn( &
      image, &
      size, &
      argc, &
      argv) bind(C, name="GO64_process_spawn") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: image
      integer(c_int64_t), value :: size
      integer(c_int64_t), value :: argc
      type(c_ptr), value :: argv
    end function GO64_process_spawn
    function GO64_process_read( &
      buffer, &
      size) bind(C, name="GO64_process_read") result(r)
      import
      integer(c_int64_t) :: r
      type(c_ptr), value :: buffer
      integer(c_int64_t), value :: size
    end function GO64_process_read
    function GO64_process_status( &
      ) bind(C, name="GO64_process_status") result(r)
      import
      integer(c_int64_t) :: r
    end function GO64_process_status
  end interface
end module gaspardos_native