Bug 456439 - add about:rights and a "Know Your Rights" infobar to Firefox. r=gavin...
[wine-gecko.git] / widget / src / gtkxtbin / gtkxtbin.h
blob3e1cc2fe29a69632d73af2fcf3e696bb1e9b58a8
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
15 * License.
17 * The Original Code is the Gtk2XtBin Widget Implementation.
19 * The Initial Developer of the Original Code is
20 * Intel Corporation.
21 * Portions created by the Initial Developer are Copyright (C) 2000
22 * the Initial Developer. All Rights Reserved.
24 * Contributor(s):
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/gtkwidget.h>
44 #include <X11/Intrinsic.h>
45 #include <X11/Xutil.h>
46 #include <X11/Xlib.h>
47 #ifdef MOZILLA_CLIENT
48 #include "nscore.h"
49 #ifdef _IMPL_GTKXTBIN_API
50 #define GTKXTBIN_API(type) NS_EXPORT_(type)
51 #else
52 #define GTKXTBIN_API(type) NS_IMPORT_(type)
53 #endif
54 #else
55 #define GTKXTBIN_API(type) type
56 #endif
58 #ifdef __cplusplus
59 extern "C" {
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), \
71 GTK_TYPE_XTBIN))
72 #define GTK_IS_XTBIN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), \
73 GTK_TYPE_XTBIN))
75 struct _GtkXtBin
77 GtkWidget widget;
78 GdkWindow *parent_window;
79 Display *xtdisplay; /* Xt Toolkit Display */
81 Widget xtwidget; /* Xt Toolkit Widget */
83 Window xtwindow; /* Xt Toolkit XWindow */
84 gint x, y;
85 gint width, height;
88 struct _GtkXtBinClass
90 GtkWidgetClass widget_class;
93 GTKXTBIN_API(GtkType) gtk_xtbin_get_type (void);
94 GTKXTBIN_API(GtkWidget *) gtk_xtbin_new (GdkWindow *parent_window, String *f);
95 GTKXTBIN_API(void) gtk_xtbin_set_position (GtkXtBin *xtbin,
96 gint x,
97 gint y);
98 GTKXTBIN_API(void) gtk_xtbin_resize (GtkWidget *widget,
99 gint width,
100 gint height);
102 typedef struct _XtTMRec {
103 XtTranslations translations; /* private to Translation Manager */
104 XtBoundActions proc_table; /* procedure bindings for actions */
105 struct _XtStateRec *current_state; /* Translation Manager state ptr */
106 unsigned long lastEventTime;
107 } XtTMRec, *XtTM;
109 typedef struct _CorePart {
110 Widget self; /* pointer to widget itself */
111 WidgetClass widget_class; /* pointer to Widget's ClassRec */
112 Widget parent; /* parent widget */
113 XrmName xrm_name; /* widget resource name quarkified */
114 Boolean being_destroyed; /* marked for destroy */
115 XtCallbackList destroy_callbacks; /* who to call when widget destroyed */
116 XtPointer constraints; /* constraint record */
117 Position x, y; /* window position */
118 Dimension width, height; /* window dimensions */
119 Dimension border_width; /* window border width */
120 Boolean managed; /* is widget geometry managed? */
121 Boolean sensitive; /* is widget sensitive to user events*/
122 Boolean ancestor_sensitive; /* are all ancestors sensitive? */
123 XtEventTable event_table; /* private to event dispatcher */
124 XtTMRec tm; /* translation management */
125 XtTranslations accelerators; /* accelerator translations */
126 Pixel border_pixel; /* window border pixel */
127 Pixmap border_pixmap; /* window border pixmap or NULL */
128 WidgetList popup_list; /* list of popups */
129 Cardinal num_popups; /* how many popups */
130 String name; /* widget resource name */
131 Screen *screen; /* window's screen */
132 Colormap colormap; /* colormap */
133 Window window; /* window ID */
134 Cardinal depth; /* number of planes in window */
135 Pixel background_pixel; /* window background pixel */
136 Pixmap background_pixmap; /* window background pixmap or NULL */
137 Boolean visible; /* is window mapped and not occluded?*/
138 Boolean mapped_when_managed;/* map window if it's managed? */
139 } CorePart;
141 typedef struct _WidgetRec {
142 CorePart core;
143 } WidgetRec, CoreRec;
145 #ifdef __cplusplus
147 #endif /* __cplusplus */
148 #endif /* __GTK_XTBIN_H__ */