1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim:expandtab:shiftwidth=2:tabstop=2: */
4 /* ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/
12 * Software distributed under the License is distributed on an "AS IS" basis,
13 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 * for the specific language governing rights and limitations under the
17 * The Original Code is the Gtk2XtBin Widget Implementation.
19 * The Initial Developer of the Original Code is
20 * Sun Microsystems, Inc.
21 * Portions created by the Initial Developer are Copyright (C) 2002
22 * the Initial Developer. All Rights Reserved.
26 * Alternatively, the contents of this file may be used under the terms of
27 * either the GNU General Public License Version 2 or later (the "GPL"), or
28 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
40 #ifndef __GTK_XTBIN_H__
41 #define __GTK_XTBIN_H__
43 #include <gtk/gtksocket.h>
44 #include <X11/Intrinsic.h>
45 #include <X11/Xutil.h>
49 #ifdef _IMPL_GTKXTBIN_API
50 #define GTKXTBIN_API(type) NS_EXPORT_(type)
52 #define GTKXTBIN_API(type) NS_IMPORT_(type)
55 #define GTKXTBIN_API(type) type
60 #endif /* __cplusplus */
62 typedef struct _GtkXtBin GtkXtBin
;
63 typedef struct _GtkXtBinClass GtkXtBinClass
;
65 #define GTK_TYPE_XTBIN (gtk_xtbin_get_type ())
66 #define GTK_XTBIN(obj) (GTK_CHECK_CAST ((obj), \
67 GTK_TYPE_XTBIN, GtkXtBin))
68 #define GTK_XTBIN_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), \
69 GTK_TYPE_XTBIN, GtkXtBinClass))
70 #define GTK_IS_XTBIN(obj) (GTK_CHECK_TYPE ((obj), \
72 #define GTK_IS_XTBIN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), \
74 typedef struct _XtClient XtClient
;
78 Widget top_widget
; /* The toplevel widget */
79 Widget child_widget
; /* The embedded widget */
89 GdkWindow
*parent_window
;
90 Display
*xtdisplay
; /* Xt Toolkit Display */
92 Window xtwindow
; /* Xt Toolkit XWindow */
95 XtClient xtclient
; /* Xt Client for XEmbed */
100 GtkSocketClass widget_class
;
103 GTKXTBIN_API(GtkType
) gtk_xtbin_get_type (void);
104 GTKXTBIN_API(GtkWidget
*) gtk_xtbin_new (GdkWindow
*parent_window
, String
*f
);
105 GTKXTBIN_API(void) gtk_xtbin_set_position (GtkXtBin
*xtbin
,
108 GTKXTBIN_API(void) gtk_xtbin_resize (GtkWidget
*widget
,
112 typedef struct _XtTMRec
{
113 XtTranslations translations
; /* private to Translation Manager */
114 XtBoundActions proc_table
; /* procedure bindings for actions */
115 struct _XtStateRec
*current_state
; /* Translation Manager state ptr */
116 unsigned long lastEventTime
;
119 typedef struct _CorePart
{
120 Widget self
; /* pointer to widget itself */
121 WidgetClass widget_class
; /* pointer to Widget's ClassRec */
122 Widget parent
; /* parent widget */
123 XrmName xrm_name
; /* widget resource name quarkified */
124 Boolean being_destroyed
; /* marked for destroy */
125 XtCallbackList destroy_callbacks
; /* who to call when widget destroyed */
126 XtPointer constraints
; /* constraint record */
127 Position x
, y
; /* window position */
128 Dimension width
, height
; /* window dimensions */
129 Dimension border_width
; /* window border width */
130 Boolean managed
; /* is widget geometry managed? */
131 Boolean sensitive
; /* is widget sensitive to user events*/
132 Boolean ancestor_sensitive
; /* are all ancestors sensitive? */
133 XtEventTable event_table
; /* private to event dispatcher */
134 XtTMRec tm
; /* translation management */
135 XtTranslations accelerators
; /* accelerator translations */
136 Pixel border_pixel
; /* window border pixel */
137 Pixmap border_pixmap
; /* window border pixmap or NULL */
138 WidgetList popup_list
; /* list of popups */
139 Cardinal num_popups
; /* how many popups */
140 String name
; /* widget resource name */
141 Screen
*screen
; /* window's screen */
142 Colormap colormap
; /* colormap */
143 Window window
; /* window ID */
144 Cardinal depth
; /* number of planes in window */
145 Pixel background_pixel
; /* window background pixel */
146 Pixmap background_pixmap
; /* window background pixmap or NULL */
147 Boolean visible
; /* is window mapped and not occluded?*/
148 Boolean mapped_when_managed
;/* map window if it's managed? */
151 typedef struct _WidgetRec
{
153 } WidgetRec
, CoreRec
;
157 #endif /* __cplusplus */
158 #endif /* __GTK_XTBIN_H__ */