Commit 7f06e1d3 authored by claes's avatar claes

GTK added

parent d15bcfc3
This diff is collapsed.
/*
* Proview $Id: glow_colpalwidget_gtk.h,v 1.1 2007-01-04 08:07:43 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#include <stdlib.h>
#include "glow_std.h"
#include <gtk/gtk.h>
#include <gtk/gtkprivate.h>
#include "glow.h"
#include "glow_ctx.h"
#include "glow_growctx.h"
#define COLPALWIDGETGTK_TYPE (colpalwidgetgtk_get_type())
#define COLPALWIDGETGTK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), COLPALWIDGETGTK_TYPE, ColPalWidgetGtk))
#define COLPALWIDGETGTK_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST((obj), COLPALWIDGETGTK, ColPalWidgetGtkClass))
#define IS_COLPALWIDGETGTK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), COLPALWIDGETGTK_TYPE))
#define IS_COLPALWIDGETGTK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((obj), COLPALWIDGETGTK_TYPE))
#define COLPALWIDGETGTK_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS((obj), COLPALWIDGETGTK, ColPalWidgetGtkClass))
GType colpalwidgetgtk_get_type(void);
GtkWidget *colpalwidgetgtk_new(
int (*init_proc)(GlowCtx *ctx, void *client_data),
void *client_data);
GtkWidget *scrolledcolpalwidgetgtk_new(
int (*init_proc)(GlowCtx *ctx, void *client_data),
void *client_data, GtkWidget **growwidget);
GtkWidget *colpalnavwidgetgtk_new( GtkWidget *main_grow);
This diff is collapsed.
/*
* Proview $Id: glow_curvewidget_gtk.h,v 1.1 2007-01-04 08:07:43 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#include <stdlib.h>
#include "glow_std.h"
#include <gtk/gtk.h>
#include <gtk/gtkprivate.h>
#include "glow.h"
#include "glow_ctx.h"
#include "glow_curvectx.h"
#define CURVEWIDGETGTK_TYPE (curvewidgetgtk_get_type())
#define CURVEWIDGETGTK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CURVEWIDGETGTK_TYPE, CurveWidgetGtk))
#define CURVEWIDGETGTK_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST((obj), CURVEWIDGETGTK, CurveWidgetGtkClass))
#define IS_CURVEWIDGETGTK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CURVEWIDGETGTK_TYPE))
#define IS_CURVEWIDGETGTK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((obj), CURVEWIDGETGTK_TYPE))
#define CURVEWIDGETGTK_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS((obj), CURVEWIDGETGTK, CurveWidgetGtkClass))
GType curvewidgetgtk_get_type(void);
GtkWidget *curvewidgetgtk_new(
int (*init_proc)(GlowCtx *ctx, void *client_data),
void *client_data);
GtkWidget *scrolledcurvewidgetgtk_new(
int (*init_proc)(GlowCtx *ctx, void *client_data),
void *client_data, GtkWidget **curvewidget);
GtkWidget *curvenavwidgetgtk_new( GtkWidget *main_curve);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Proview $Id: glow_growwidget_gtk.h,v 1.1 2007-01-04 08:07:43 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#include <stdlib.h>
#include "glow_std.h"
#include <gtk/gtk.h>
#include <gtk/gtkprivate.h>
#include "glow.h"
#include "glow_ctx.h"
#include "glow_growctx.h"
#define GROWWIDGETGTK_TYPE (growwidgetgtk_get_type())
#define GROWWIDGETGTK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GROWWIDGETGTK_TYPE, GrowWidgetGtk))
#define GROWWIDGETGTK_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST((obj), GROWWIDGETGTK, GrowWidgetGtkClass))
#define IS_GROWWIDGETGTK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GROWWIDGETGTK_TYPE))
#define IS_GROWWIDGETGTK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((obj), GROWWIDGETGTK_TYPE))
#define GROWWIDGETGTK_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS((obj), GROWWIDGETGTK, GrowWidgetGtkClass))
GType growwidgetgtk_get_type(void);
GtkWidget *growwidgetgtk_new(
int (*init_proc)(GlowCtx *ctx, void *client_data),
void *client_data);
GtkWidget *scrolledgrowwidgetgtk_new(
int (*init_proc)(GlowCtx *ctx, void *client_data),
void *client_data, GtkWidget **growwidget);
GtkWidget *grownavwidgetgtk_new( GtkWidget *main_grow);
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
This diff is collapsed.
/*
* Proview $Id: glow_colpalwidget_motif.h,v 1.1 2007-01-04 08:08:00 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#ifndef colpal_widget_h
#define colpal_widget_h
#if defined __cplusplus
extern "C" {
#endif
/* X Toolkit is compiled with member alignment */
#if defined OS_VMS
#pragma member_alignment save
#pragma member_alignment
#endif
#include <X11/CoreP.h>
#include <X11/CompositeP.h>
typedef struct {
XmOffsetPtr *offset;
int reserved;
} colpalClassPart;
typedef struct {
CoreClassPart core_class;
CompositeClassPart composite_class;
colpalClassPart colpal_class;
} ColPalClassRec, *ColPalWidgetClass;
typedef struct {
void *colpal_ctx;
void *draw_ctx;
int (*init_proc)(GlowCtx *ctx, void *clien_data);
int is_navigator;
void *client_data;
Widget main_colpal_widget;
Widget scroll_h;
Widget scroll_v;
Widget form;
} ColPalPart;
typedef struct {
CorePart core;
CompositePart composite;
ColPalPart colpal;
} ColPalRec, *ColPalWidget;
Widget ColPalCreate(
Widget parent,
char *name,
ArgList args,
int argCount,
int (*init_proc)(GlowCtx *ctx, void *client_data),
void *client_data
);
Widget ColPalCreateNav( Widget parent, char *name, ArgList args, int argCount,
Widget main_colpal);
Widget ScrolledColPalCreate(
Widget parent,
char *name,
ArgList args,
int argCount,
int (*init_proc)(GlowCtx *ctx, void *client_data),
void *client_data,
Widget *colpal_w
);
void ColPalCtxFromWidget( Widget w, void **ctx);
#if defined OS_VMS
#pragma member_alignment restore
#endif
#if defined __cplusplus
}
#endif
#endif
/*
* Proview $Id: glow_curvewidget.cpp,v 1.2 2005-09-01 14:57:53 claes Exp $
* Proview $Id: glow_curvewidget_motif.cpp,v 1.1 2007-01-04 08:08:00 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -39,8 +39,8 @@
#include "glow.h"
#include "glow_curvectx.h"
#include "glow_draw.h"
#include "glow_curvewidget.h"
#include "glow_draw_xlib.h"
#include "glow_curvewidget_motif.h"
typedef struct {
Widget curve;
......@@ -349,13 +349,12 @@ static void Initialize( Widget rec, Widget new_widget, ArgList arg, int *args)
static void Redisplay( Widget w, XEvent *event, Region region)
{
draw_event_handler( (CurveCtx *)((CurveWidget)w)->curve.curve_ctx, *event);
((GlowDrawXLib *)((CurveCtx *)((CurveWidget)w)->curve.curve_ctx)->gdraw)->event_handler( *event);
}
static void Notify( Widget w, XEvent *event)
{
draw_event_handler( (CurveCtx *)((CurveWidget)w)->curve.curve_ctx, *event);
((GlowDrawXLib *)((CurveCtx *)((CurveWidget)w)->curve.curve_ctx)->gdraw)->event_handler( *event);
}
static Boolean SetValues( Widget old, Widget request, Widget new_widget)
......@@ -367,7 +366,7 @@ static void Destroy( Widget w)
{
if ( ((CurveWidget) w)->curve.is_navigator)
return;
glow_draw_delete( (GlowCtx *)((CurveWidget)w)->curve.curve_ctx);
delete (GlowDraw *)((CurveWidget)w)->curve.draw_ctx;
}
static void Realize( Widget w, unsigned long *mask, XSetWindowAttributes *swa)
......@@ -383,14 +382,16 @@ static void Realize( Widget w, unsigned long *mask, XSetWindowAttributes *swa)
CurveWidget main_curve = (CurveWidget) ((CurveWidget) w)->curve.main_curve_widget;
((CurveWidget) w)->curve.curve_ctx = main_curve->curve.curve_ctx;
glow_draw_init_nav( w, main_curve->curve.curve_ctx);
((CurveWidget) w)->curve.draw_ctx = main_curve->curve.draw_ctx;
((GlowDrawXLib *)((CurveWidget) w)->curve.draw_ctx)->init_nav( w);
}
}
else
{
if ( !((CurveWidget) w)->curve.curve_ctx)
{
glow_draw_init( w, &((CurveWidget) w)->curve.curve_ctx,
((CurveWidget) w)->curve.draw_ctx = new GlowDrawXLib( w,
&((CurveWidget) w)->curve.curve_ctx,
curve_init_proc,
((CurveWidget) w)->curve.client_data,
glow_eCtxType_Curve);
......
/*
* Proview $Id: glow_curvewidget.h,v 1.2 2005-09-01 14:57:53 claes Exp $
* Proview $Id: glow_curvewidget_motif.h,v 1.1 2007-01-04 08:08:00 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -47,6 +47,7 @@ typedef struct {
typedef struct {
void *curve_ctx;
void *draw_ctx;
int (*init_proc)(GlowCtx *ctx, void *clien_data);
int is_navigator;
void *client_data;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment