Code hints for prototypes declared in macros?
Posted: Tue Dec 18, 2018 12:34 pm
				
				Hi All!
Hoping someone can guide me, how can I make code hints? Like where the IDE shows a hint in the status bar showing the arguments.
I make these prototypes in a macro that call dll functions, but there are many, many functions imported with many different declarations!
I really want to get a hint shown in the IDE of the declaration for things, because there are many, many imports to remember, like hundreds!!
Even if I can add a 'manually' by a text list - write a quick parser to , file or something, or there is a trick to writing or commenting in the source that does this? .... or there is something i'm missing?  or I use the wrong terminology in the forum searching?
Cheers,
Hippy
			Hoping someone can guide me, how can I make code hints? Like where the IDE shows a hint in the status bar showing the arguments.
I make these prototypes in a macro that call dll functions, but there are many, many functions imported with many different declarations!
Code: Select all
Macro _dq_  ; double quotes
  "
EndMacro
mydll = OpenLibrary(mydll_name$)
; functions with arguments
Macro Get_UI_Lib_Func(name, parameters)
  PrototypeC name#_Prototype parameters
  Global name.name#_Prototype
  If IsLibrary(mydll)
    name = GetFunction(mydll, _dq_#name#_dq_)
    If Not name 
      Debug("Failed to find '" + _dq_#name#_dq_ +"'")
    Else
      ;Debug _dq_ name parameters _dq_
      mydll_API_Coverage + 1
    EndIf
  Else
    Debug("Library not open.")  ;     Debug "Library not open."    
    Print("Error, Unable To open " +#mydll_name$)
    CallDebugger
    End 
  EndIf
EndMacro
; example usage
Get_UI_Lib_Func(_ReleaseImage,(textureID.l))
Code: Select all
;                            VVVV Function                VVVVVVVV Parameter in brackets                                     
Get_UI_Lib_Func(  WindowSizeConstraints,   (minW.f, minH.f , maxW.f ,maxH.f , *custom_callback, *custom_callback_data)   )
Cheers,
Hippy