/* LIBPIKA - The PIKA Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* pika.h
*
* This library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* .
*/
#ifndef __PIKA_H__
#define __PIKA_H__
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define __PIKA_H_INSIDE__
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/* Resources and their widgets. Order important. */
#include
#include
#undef __PIKA_H_INSIDE__
#ifdef G_OS_WIN32
#include /* For __argc and __argv */
#endif
G_BEGIN_DECLS
/**
* PIKA_MAIN:
* @plug_in_type: The #GType of the plug-in's #PikaPlugIn subclass
*
* A macro that expands to the appropriate main() function for the
* platform being compiled for.
*
* To use this macro, simply place a line that contains just the code
*
* PIKA_MAIN (MY_TYPE_PLUG_IN)
*
* at the toplevel of your file. No semicolon should be used.
*
* Since: 3.0
**/
#ifdef G_OS_WIN32
/* Define WinMain() because plug-ins are built as GUI applications. Also
* define a main() in case some plug-in still is built as a console
* application.
*/
# ifdef __GNUC__
# ifndef _stdcall
# define _stdcall __attribute__((stdcall))
# endif
# endif
# define PIKA_MAIN(plug_in_type) \
struct HINSTANCE__; \
\
int _stdcall \
WinMain (struct HINSTANCE__ *hInstance, \
struct HINSTANCE__ *hPrevInstance, \
char *lpszCmdLine, \
int nCmdShow); \
\
int _stdcall \
WinMain (struct HINSTANCE__ *hInstance, \
struct HINSTANCE__ *hPrevInstance, \
char *lpszCmdLine, \
int nCmdShow) \
{ \
return pika_main (plug_in_type, \
__argc, __argv); \
} \
\
int \
main (int argc, char *argv[]) \
{ \
/* Use __argc and __argv here, too, as they work \
* better with mingw-w64. \
*/ \
return pika_main (plug_in_type, \
__argc, __argv); \
}
#else
# define PIKA_MAIN(plug_in_type) \
int \
main (int argc, char *argv[]) \
{ \
return pika_main (plug_in_type, \
argc, argv); \
}
#endif
/* The main procedure that must be called with the plug-in's
* PikaPlugIn subclass type and the 'argc' and 'argv' that are passed
* to "main".
*/
gint pika_main (GType plug_in_type,
gint argc,
gchar *argv[]);
/* Return the PikaPlugIn singleton of this plug-in process
*/
PikaPlugIn * pika_get_plug_in (void);
/* Return the PikaPDB singleton of this plug-in process
*/
PikaPDB * pika_get_pdb (void);
/* Forcefully causes the pika library to exit and
* close down its connection to main pika application.
*/
void pika_quit (void) G_GNUC_NORETURN;
/* Return various constants given by the PIKA core at plug-in config time.
*/
guint pika_tile_width (void) G_GNUC_CONST;
guint pika_tile_height (void) G_GNUC_CONST;
gboolean pika_show_help_button (void) G_GNUC_CONST;
gboolean pika_export_color_profile (void) G_GNUC_CONST;
gboolean pika_export_comment (void) G_GNUC_CONST;
gboolean pika_export_exif (void) G_GNUC_CONST;
gboolean pika_export_xmp (void) G_GNUC_CONST;
gboolean pika_export_iptc (void) G_GNUC_CONST;
gboolean pika_export_thumbnail (void) G_GNUC_CONST;
gint pika_get_num_processors (void) G_GNUC_CONST;
PikaCheckSize pika_check_size (void) G_GNUC_CONST;
PikaCheckType pika_check_type (void) G_GNUC_CONST;
const PikaRGB * pika_check_custom_color1 (void) G_GNUC_CONST;
const PikaRGB * pika_check_custom_color2 (void) G_GNUC_CONST;
PikaDisplay * pika_default_display (void) G_GNUC_CONST;
const gchar * pika_wm_class (void) G_GNUC_CONST;
const gchar * pika_display_name (void) G_GNUC_CONST;
gint pika_monitor_number (void) G_GNUC_CONST;
guint32 pika_user_time (void) G_GNUC_CONST;
const gchar * pika_icon_theme_dir (void) G_GNUC_CONST;
const gchar * pika_get_progname (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __PIKA_H__ */