view include/plugin.h @ 11:e6a594f16403

*: huge refactor the config file has changed drastically, moving to an ini file from that custom format; i *would* have used the win32 functions for those, but they were barely functional, so I decided on using ini.h which is lightweight enough. additionally, I've added Deezer support so album art will be displayed! unfortunately though winhttp is a pain in the ass so if I send a request with any form of unicode chars in it it just returns a "bad request" error. I've tried debugging this but I could never really come up with anything: my hypothesis is that deezer expects their characters in percent-encoded UTF-8, but winhttp is sending them in some other encoding. the config dialog was moved out of config.c (overdue) and many more options are given in the config as well. main.c has been renamed to plugin.c to better differentiate it from... everything else.
author Paper <paper@paper.us.eu.org>
date Thu, 14 Mar 2024 20:25:37 -0400
parents
children
line wrap: on
line source

#ifndef __plugin_h
#define __plugin_h

#include <windef.h>

struct winamp_gpp {
    int version;			// version of the plugin structure
    char* description;		// name/title of the plugin 
    int(*init)();			// function which will be executed on init event
    void(*conf)();			// function which will be executed on config event
    void(*quit)();			// function which will be executed on quit event
    HWND hwndParent;		// hwnd of the Winamp client main window (stored by Winamp when dll is loaded)
    HINSTANCE hDllInstance;	// hinstance of this plugin DLL. (stored by Winamp when dll is loaded) 
};

extern struct winamp_gpp g_plugin; // plugin.c

void update_rich_presence_details(void);

#endif // __plugin_h