Code hints for prototypes declared in macros?

Working on new editor enhancements?
hippy
User
User
Posts: 28
Joined: Tue Mar 05, 2013 3:11 pm

Code hints for prototypes declared in macros?

Post by hippy »

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!

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))
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!!

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)   )

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