struct GTK_PTRS gtk = { 1 }; /* initialize the first field "not_initialized" so we can tell when we've loaded the pointers */

static _TCHAR* minVerMsg1 = _T_ECLIPSE("Starting from the Eclipse 4.7 (Oxygen) release, \nGTK+ versions below");
static _TCHAR* minVerMsg2 = _T_ECLIPSE("are not supported.\nGTK+ version found is");
static _TCHAR* minVerTitle = _T_ECLIPSE("Unsupported GTK+ version");
static _TCHAR* gtkInitFail = _T_ECLIPSE("Unable to initialize GTK+\n");
static _TCHAR* upgradeWarning1 = _T_ECLIPSE("\nPlease upgrade GTK+ to minimum version");
static _TCHAR* upgradeWarning2 = _T_ECLIPSE("\nor use an older version of Eclipse.\nClick OK to Exit.");
static int minGtkMajorVersion = 2;
static int minGtkMinorVersion = 24;
static int minGtkMicroVersion = 0;

/* tables to help initialize the function pointers */
/* functions from libgtk-x11-2.0 or libgtk-3.so.0*/
static FN_TABLE gtkFunctions[] = {
	FN_TABLE_ENTRY(gtk_container_add, 1),
	FN_TABLE_ENTRY(gtk_dialog_run, 1),
	FN_TABLE_ENTRY(gtk_image_new_from_pixbuf, 1),
	FN_TABLE_ENTRY(gtk_init_with_args, 1),
	FN_TABLE_ENTRY(gtk_message_dialog_new, 1),
	FN_TABLE_ENTRY(gtk_widget_destroy, 1),
	FN_TABLE_ENTRY(gtk_widget_destroyed, 1),
	FN_TABLE_ENTRY(gtk_widget_show_all, 1),
	FN_TABLE_ENTRY(gtk_window_new, 1),
	FN_TABLE_ENTRY(gtk_window_resize, 1),
	FN_TABLE_ENTRY(gtk_window_set_title, 1),
	FN_TABLE_ENTRY(gtk_window_set_decorated, 1),
	FN_TABLE_ENTRY(gtk_window_set_type_hint, 1),
	FN_TABLE_ENTRY(gtk_window_set_position, 1),
	{ NULL, NULL }
};
Exemple #2
0
 *******************************************************************************/

#include "eclipseMotif.h"
#include "eclipseCommon.h"
#include <dlfcn.h>
#include <stdlib.h>

struct MOTIF_PTRS motif;

/* need to undef these so the FN_TABLE works ok */
#undef _XmStrings
#undef XtShellStrings
#undef XtStrings

/* functions from libXm */
static FN_TABLE xmFunctions[] = {	FN_TABLE_ENTRY(XmCreateDrawingArea),
                                    FN_TABLE_ENTRY(XmCreateLabelGadget),
                                    FN_TABLE_ENTRY(XmCreateMainWindow),
                                    FN_TABLE_ENTRY(XmCreateMessageDialog),
                                    FN_TABLE_ENTRY(XmMessageBoxGetChild),
                                    FN_TABLE_ENTRY(XmStringFree),
                                    FN_TABLE_ENTRY(XmStringGenerate),
                                    FN_TABLE_ENTRY(_XmStrings),		/* not a function */
{ NULL, NULL }
                                };

/* functions from libXt */
static FN_TABLE xtFunctions[] = {	FN_TABLE_ENTRY(XtAddCallback),
                                    FN_TABLE_ENTRY(XtAppCreateShell),
                                    FN_TABLE_ENTRY(XtAppNextEvent),
                                    FN_TABLE_ENTRY(XtAppPending),
struct GTK_PTRS gtk = { 1 }; /* initialize the first field "not_initialized" so we can tell when we've loaded the pointers */

static _TCHAR* minVerMsg1 = _T_ECLIPSE("Starting from the Eclipse 4.7 (Oxygen) release, \nGTK+ versions below");
static _TCHAR* minVerMsg2 = _T_ECLIPSE("are not supported.\nGTK+ version found is");
static _TCHAR* minVerTitle = _T_ECLIPSE("Unsupported GTK+ version");
static _TCHAR* gtkInitFail = _T_ECLIPSE("Unable to initialize GTK+\n");
static _TCHAR* upgradeWarning1 = _T_ECLIPSE("\nPlease upgrade GTK+ to minimum version");
static _TCHAR* upgradeWarning2 = _T_ECLIPSE("\nor use an older version of Eclipse.\nClick OK to Exit.");
static int minGtkMajorVersion = 3;
static int minGtkMinorVersion = 0;
static int minGtkMicroVersion = 0;

/* tables to help initialize the function pointers */
/* functions from libgtk-3.so.0*/
static FN_TABLE gtkFunctions[] = {
	FN_TABLE_ENTRY(gtk_container_add, 1),
	FN_TABLE_ENTRY(gtk_dialog_run, 1),
	FN_TABLE_ENTRY(gtk_image_new_from_pixbuf, 1),
	FN_TABLE_ENTRY(gtk_init_with_args, 1),
	FN_TABLE_ENTRY(gtk_message_dialog_new, 1),
	FN_TABLE_ENTRY(gtk_widget_destroy, 1),
	FN_TABLE_ENTRY(gtk_widget_destroyed, 1),
	FN_TABLE_ENTRY(gtk_widget_show_all, 1),
	FN_TABLE_ENTRY(gtk_window_new, 1),
	FN_TABLE_ENTRY(gtk_window_resize, 1),
	FN_TABLE_ENTRY(gtk_window_set_title, 1),
	FN_TABLE_ENTRY(gtk_window_set_decorated, 1),
	FN_TABLE_ENTRY(gtk_window_set_type_hint, 1),
	FN_TABLE_ENTRY(gtk_window_set_position, 1),
	{ NULL, NULL }
};