mirror of https://github.com/GNOME/gimp.git
OS2 patches
This commit is contained in:
parent
3a9e48cf77
commit
4689f3c4d4
|
@ -1,5 +1,8 @@
|
||||||
Wed May 19 19:48:10 1999 ape@lrdpf.spacetec.no (Asbjorn Pettersen)
|
Wed May 19 19:48:10 1999 ape@lrdpf.spacetec.no (Asbjorn Pettersen)
|
||||||
|
|
||||||
|
* modules/colorsel_gtk.c :
|
||||||
|
* modules/colorsel_triangle.c: OS/2 patches.
|
||||||
|
|
||||||
* plug-ins/bz2/bz2.c: OS/2 patches. spawn(),,
|
* plug-ins/bz2/bz2.c: OS/2 patches. spawn(),,
|
||||||
|
|
||||||
Wed May 19 01:05:08 MEST 1999 Sven Neumann <sven@gimp.org>
|
Wed May 19 01:05:08 MEST 1999 Sven Neumann <sven@gimp.org>
|
||||||
|
|
|
@ -49,6 +49,32 @@ static GimpModuleInfo info = {
|
||||||
"17 Jan 1999"
|
"17 Jan 1999"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __EMX__
|
||||||
|
struct main_funcs_struc {
|
||||||
|
gchar *name;
|
||||||
|
void (*func)();
|
||||||
|
};
|
||||||
|
struct main_funcs_struc *gimp_main_funcs = NULL;
|
||||||
|
|
||||||
|
static gpointer
|
||||||
|
get_main_func(gchar *name)
|
||||||
|
{
|
||||||
|
struct main_funcs_struc *x;
|
||||||
|
if (gimp_main_funcs == NULL)
|
||||||
|
return NULL;
|
||||||
|
for (x = gimp_main_funcs; x->name; x++)
|
||||||
|
{
|
||||||
|
if (!strcmp(x->name, name))
|
||||||
|
return (gpointer) x->func;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
typedef GimpColorSelectorID (*color_reg_func)(const char *,
|
||||||
|
GimpColorSelectorMethods *);
|
||||||
|
typedef gboolean (*color_unreg_func) (GimpColorSelectorID,
|
||||||
|
void (*)(void *),
|
||||||
|
void *);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* globaly exported init function */
|
/* globaly exported init function */
|
||||||
G_MODULE_EXPORT GimpModuleStatus
|
G_MODULE_EXPORT GimpModuleStatus
|
||||||
|
@ -56,9 +82,15 @@ module_init (GimpModuleInfo **inforet)
|
||||||
{
|
{
|
||||||
GimpColorSelectorID id;
|
GimpColorSelectorID id;
|
||||||
|
|
||||||
|
#ifndef __EMX__
|
||||||
id = gimp_color_selector_register ("GTK", &methods);
|
id = gimp_color_selector_register ("GTK", &methods);
|
||||||
|
|
||||||
if (id)
|
if (id)
|
||||||
|
#else
|
||||||
|
color_reg_func reg_func;
|
||||||
|
reg_func = (color_reg_func) get_main_func("gimp_color_selector_register");
|
||||||
|
if (reg_func && (id = (*reg_func) ("GTK", &methods)))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
info.shutdown_data = id;
|
info.shutdown_data = id;
|
||||||
*inforet = &info;
|
*inforet = &info;
|
||||||
|
@ -76,7 +108,14 @@ module_unload (void *shutdown_data,
|
||||||
void (*completed_cb)(void *),
|
void (*completed_cb)(void *),
|
||||||
void *completed_data)
|
void *completed_data)
|
||||||
{
|
{
|
||||||
|
#ifndef __EMX__
|
||||||
gimp_color_selector_unregister (shutdown_data, completed_cb, completed_data);
|
gimp_color_selector_unregister (shutdown_data, completed_cb, completed_data);
|
||||||
|
#else
|
||||||
|
color_unreg_func unreg_func;
|
||||||
|
unreg_func = (color_unreg_func) get_main_func("gimp_color_selector_unregister");
|
||||||
|
if (unreg_func)
|
||||||
|
(*unreg_func) (shutdown_data, completed_cb, completed_data);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,33 @@ static void update_color_preview (ColorSelectP, GtkWidget *, gint);
|
||||||
static void color_select_update_hsv_values (ColorSelectP);
|
static void color_select_update_hsv_values (ColorSelectP);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __EMX__
|
||||||
|
struct main_funcs_struc {
|
||||||
|
gchar *name;
|
||||||
|
void (*func)();
|
||||||
|
};
|
||||||
|
struct main_funcs_struc *gimp_main_funcs = NULL;
|
||||||
|
|
||||||
|
static gpointer
|
||||||
|
get_main_func(gchar *name)
|
||||||
|
{
|
||||||
|
struct main_funcs_struc *x;
|
||||||
|
if (gimp_main_funcs == NULL)
|
||||||
|
return NULL;
|
||||||
|
for (x = gimp_main_funcs; x->name; x++)
|
||||||
|
{
|
||||||
|
if (!strcmp(x->name, name))
|
||||||
|
return (gpointer) x->func;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
typedef GimpColorSelectorID (*color_reg_func)(const char *,
|
||||||
|
GimpColorSelectorMethods *);
|
||||||
|
typedef gboolean (*color_unreg_func) (GimpColorSelectorID,
|
||||||
|
void (*)(void *),
|
||||||
|
void *);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
|
|
||||||
/* globaly exported init function */
|
/* globaly exported init function */
|
||||||
|
@ -113,9 +140,15 @@ module_init (GimpModuleInfo **inforet)
|
||||||
{
|
{
|
||||||
GimpColorSelectorID id;
|
GimpColorSelectorID id;
|
||||||
|
|
||||||
|
#ifndef __EMX__
|
||||||
id = gimp_color_selector_register ("Triangle", &methods);
|
id = gimp_color_selector_register ("Triangle", &methods);
|
||||||
|
|
||||||
if (id)
|
if (id)
|
||||||
|
#else
|
||||||
|
color_reg_func reg_func;
|
||||||
|
reg_func = (color_reg_func) get_main_func("gimp_color_selector_register");
|
||||||
|
if (reg_func && (id = (*reg_func) ("Triangle", &methods)))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
info.shutdown_data = id;
|
info.shutdown_data = id;
|
||||||
*inforet = &info;
|
*inforet = &info;
|
||||||
|
@ -133,7 +166,15 @@ module_unload (void *shutdown_data,
|
||||||
void (*completed_cb)(void *),
|
void (*completed_cb)(void *),
|
||||||
void *completed_data)
|
void *completed_data)
|
||||||
{
|
{
|
||||||
|
#ifndef __EMX__
|
||||||
gimp_color_selector_unregister (shutdown_data, completed_cb, completed_data);
|
gimp_color_selector_unregister (shutdown_data, completed_cb, completed_data);
|
||||||
|
#else
|
||||||
|
color_unreg_func unreg_func;
|
||||||
|
unreg_func = (color_unreg_func) get_main_func("gimp_color_selector_unregister"
|
||||||
|
);
|
||||||
|
if (unreg_func)
|
||||||
|
(*unreg_func) (shutdown_data, completed_cb, completed_data);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -167,6 +208,8 @@ static GtkWidget * colorsel_triangle_new (int r, int g, int b,
|
||||||
coldata->callback = callback;
|
coldata->callback = callback;
|
||||||
coldata->data = callback_data;
|
coldata->data = callback_data;
|
||||||
|
|
||||||
|
/* gtk_rc_parse ("colorselrc"); */
|
||||||
|
|
||||||
preview = create_color_preview (coldata);
|
preview = create_color_preview (coldata);
|
||||||
coldata->preview = preview;
|
coldata->preview = preview;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue