It is currently Thu Jan 28, 2021 4:03 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Code hints for prototypes declared in macros?
PostPosted: Tue Dec 18, 2018 12:34 pm 
Offline
User
User

Joined: Tue Mar 05, 2013 3:11 pm
Posts: 28
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:

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:
;                            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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye