forked from AuroraMiddleware/gtk
gtkmain: Fix build on Windows
gtk_init() removed its support for supporting arguments, so we ought to do likewise for Windows, which actually defines items that call gtk_init() the old way (and also get rid of argument support in those functions, since the direction is to not support them). https://bugzilla.gnome.org/show_bug.cgi?id=773299
This commit is contained in:
parent
f31aad3963
commit
3629def0d0
@ -875,21 +875,21 @@ check_sizeof_GtkBox (size_t sizeof_GtkBox)
|
|||||||
* in the number of extra args.
|
* in the number of extra args.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_init_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
|
gtk_init_abi_check (int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
|
||||||
{
|
{
|
||||||
check_sizeof_GtkWindow (sizeof_GtkWindow);
|
check_sizeof_GtkWindow (sizeof_GtkWindow);
|
||||||
if (num_checks >= 2)
|
if (num_checks >= 2)
|
||||||
check_sizeof_GtkBox (sizeof_GtkBox);
|
check_sizeof_GtkBox (sizeof_GtkBox);
|
||||||
gtk_init (argc, argv);
|
gtk_init ();
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gtk_init_check_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
|
gtk_init_check_abi_check (int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
|
||||||
{
|
{
|
||||||
check_sizeof_GtkWindow (sizeof_GtkWindow);
|
check_sizeof_GtkWindow (sizeof_GtkWindow);
|
||||||
if (num_checks >= 2)
|
if (num_checks >= 2)
|
||||||
check_sizeof_GtkBox (sizeof_GtkBox);
|
check_sizeof_GtkBox (sizeof_GtkBox);
|
||||||
return gtk_init_check (argc, argv);
|
return gtk_init_check ();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -84,20 +84,16 @@ gboolean gtk_init_check (void);
|
|||||||
* when building GTK+-using code.
|
* when building GTK+-using code.
|
||||||
*/
|
*/
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gtk_init_abi_check (int *argc,
|
void gtk_init_abi_check (int num_checks,
|
||||||
char ***argv,
|
|
||||||
int num_checks,
|
|
||||||
size_t sizeof_GtkWindow,
|
size_t sizeof_GtkWindow,
|
||||||
size_t sizeof_GtkBox);
|
size_t sizeof_GtkBox);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
gboolean gtk_init_check_abi_check (int *argc,
|
gboolean gtk_init_check_abi_check (int num_checks,
|
||||||
char ***argv,
|
|
||||||
int num_checks,
|
|
||||||
size_t sizeof_GtkWindow,
|
size_t sizeof_GtkWindow,
|
||||||
size_t sizeof_GtkBox);
|
size_t sizeof_GtkBox);
|
||||||
|
|
||||||
#define gtk_init(argc, argv) gtk_init_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox))
|
#define gtk_init() gtk_init_abi_check (2, sizeof (GtkWindow), sizeof (GtkBox))
|
||||||
#define gtk_init_check(argc, argv) gtk_init_check_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox))
|
#define gtk_init_check() gtk_init_check_abi_check (2, sizeof (GtkWindow), sizeof (GtkBox))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user