Typo.
[cl-gtk2.git] / doc / gdk.ref.texi
index cb61869..2297411 100644 (file)
 @menu
-* gdk Classes::
-* gdk Enums::
-* gdk Flags::
+* Screens and displays::
+* Gdk Objects::
+* Gdk Structs::
+* Gdk Enums::
+* Gdk Flags::
 @end menu
 
-@node gdk Classes
-@section gdk Classes
+@node Screens and displays
+@section Screens and displays
 
 @menu
 * display::
-* display-manager::
-* drag-context::
-* drawable::
-* gdk-window::
-* graphics-context::
-* keymap::
-* pango-layout::
-* pixbuf::
-* pixbuf-animation::
-* pixmap::
 * screen::
 @end menu
 
-Reference of classes in package GDK
-
-@node display
-@subsection display
-@Class display
-
-Superclasses: @ref{g-object}
-
-Slots:
-None
-
-Signals:
-@itemize
-@item closed. (@code{boolean}) -> @code{null}  [run-last]
-
-@end itemize
-
-@node display-manager
-@subsection display-manager
-@Class display-manager
-
-Superclasses: @ref{g-object}
-
-Slots:
-@itemize
-@item default-display. Type: @ref{display} (flags: readable writable)
-
-
-
-@end itemize
-Signals:
+Multihead support is based around two main object types:
 @itemize
-@item display-opened. (@ref{display}) -> @code{null}  [run-last]
-
+@item @ref{display}
+@item @ref{screen}
 @end itemize
 
-@node drag-context
-@subsection drag-context
-@Class drag-context
-
-Superclasses: @ref{g-object}
-
-Slots:
-None
-
-Signals:
-None
-
-
-@node drawable
-@subsection drawable
-@Class drawable
-
-Superclasses: @ref{g-object}
-
-Slots:
-None
-
-Signals:
-None
-
+@ref{display} objects are the GDK representation of the X Display which
+can be described as a workstation consisting of a keyboard a pointing
+device (such as a mouse) and one or more screens. It is used to open and
+keep track of various GdkScreen objects currently instanciated by the
+application. It is also used to grab and release the keyboard and the
+mouse pointer.
 
-@node gdk-window
-@subsection gdk-window
-@Class gdk-window
+@ref{screen} objects are the GDK representation of a physical screen. It
+is used throughout GDK and GTK+ to specify which screen the top level
+windows are to be displayed on. It is also used to query the screen
+specification and default settings such as the default colormap
+(@code{screen-default-colormap}), the screen width
+(@code{screen-width}), etc.
 
-Superclasses: @ref{drawable}
+The following code samples demonstrate common usage of the objects
+described above.
 
-Slots:
-None
-
-Signals:
-None
+Testing the number of screen on the current display:
+@lisp
+(use-package :gdk)
 
+(defvar *display* (default-display))
 
-@node graphics-context
-@subsection graphics-context
-@Class graphics-context
-
-Superclasses: @ref{g-object}
-
-Slots:
-None
-
-Signals:
-None
+(display-name *display*) @result{} ":0.0"
 
+(display-n-screens *display*) @result{} 1
+@end lisp
 
-@node keymap
-@subsection keymap
-@Class keymap
+Opening a second display:
+(TODO)
+@lisp
+/* screen2_name needs to be initialized before calling 
+/* gdk_display_new() */
+second_display = gdk_display_new (&argc, &argv, second_screen_name);
+if (second_display)
+    second_screen = gdk_display_get_default_screen (second_display);
+else 
+  @{
+       g_print ("Can't open display :\n\t%s\n\n",
+                 second_screen_name);
+    exit (1);  
+  @}
+/* now GdkScreen can be assigned to GtkWindows */
 
-Superclasses: @ref{g-object}
+window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+gtk_window_set_screen (window, second_screen);
+@end lisp
 
-Slots:
-None
-
-Signals:
-None
-
-
-@node pango-layout
-@subsection pango-layout
-@Class pango-layout
-
-Superclasses: @ref{g-object}
-
-Slots:
-None
+@node display
+@subsection display
 
-Signals:
-None
+@menu
+* display-name::
+* display-n-screens::
+* display-default-screen::
+@end menu
 
+@Class display
+@Superclass g-object
 
-@node pixbuf
-@subsection pixbuf
-@Class pixbuf
+@ref{display} controls the keyboard/mouse pointer grabs and a set of @ref{screen}s.
 
-Superclasses: @ref{g-object}
+@ref{display} objects purpose are two fold:
 
-Slots:
 @itemize
-@item bits-per-sample. Type: @code{integer} (flags: readable writable constructor-only)
-
-
-
-@item colorspace. Type: @ref{colorspace} (flags: readable writable constructor-only)
-
-
-
-@item has-alpha. Type: @code{boolean} (flags: readable writable constructor-only)
-
-
-
-@item height. Type: @code{integer} (flags: readable writable constructor-only)
-
-
-
-@item n-channels. Type: @code{integer} (flags: readable writable constructor-only)
-
-
-
-@item pixels. Type: @code{foreign-pointer} (flags: readable writable constructor-only)
-
-
-
-@item rowstride. Type: @code{integer} (flags: readable writable constructor-only)
-
-
-
-@item width. Type: @code{integer} (flags: readable writable constructor-only)
-
-
-
+@item To grab/ungrab keyboard focus and mouse pointer
+@item To manage and provide information about the @ref{screen}(s) available for this @ref{display}
 @end itemize
-Signals:
-None
 
+@ref{display} objects are the GDK representation of the X Display which
+can be described as a workstation consisting of a keyboard a pointing
+device (such as a mouse) and one or more screens. It is used to open and
+keep track of various @ref{screen} objects currently instanciated by the
+application. It is also used to grab and release the keyboard and the
+mouse pointer.
 
-@node pixbuf-animation
-@subsection pixbuf-animation
-@Class pixbuf-animation
+@node display-name
+@subsubsection display-name
+@TypedAccessor {display-name, display, @code{string}}
+The name of a @var{display} (e.g. @code{":0.0"})
 
-Superclasses: @ref{g-object}
-
-Slots:
-None
-
-Signals:
-None
-
-
-@node pixmap
-@subsection pixmap
-@Class pixmap
-
-Superclasses: @ref{drawable}
-
-Slots:
-None
-
-Signals:
-None
+@node display-n-screens
+@subsubsection display-n-screens
+@TypedAccessor {display-n-screens, display, @code{integer}}
+The number of screen managed by the @var{display}.
 
+@node display-default-screen
+@subsubsection display-default-screens
+@TypedAccessor {display-default-screen, display, @code{screen}}
+The default screen of the @var{display}.
 
 @node screen
 @subsection screen
-@Class screen
 
-Superclasses: @ref{g-object}
+@Class screen
+Superclass: @ref{g-object}
 
 Slots:
 @itemize
-@item font-options. Type: @code{foreign-pointer} (flags: readable writable)
-
-
-
-@item resolution. Type: @code{double-float} (flags: readable writable)
-
-
-
-@end itemize
-Signals:
-@itemize
-@item composited-changed. () -> @code{null}  [run-last]
-
-@item monitors-changed. () -> @code{null}  [run-last]
-
-@item size-changed. () -> @code{null}  [run-last]
-
-@end itemize
-
-@node gdk Enums
-@section gdk Enums
-
-@menu
-* colorspace::
-* event-type::
-* font-type::
-* gdk-extension-mode::
-* gdk-window-type-hint::
-* grab-status::
-* gravity::
-* owner-change::
-* property-state::
-* scroll-direction::
-* setting-action::
-* visibility-state::
-* window-edge::
-@end menu
-
-Reference of enums in package GDK
-
-@node colorspace
-@subsection colorspace
-@Enum colorspace
-Values:
-@itemize
-@item :rgb
-@end itemize
-
-
-@node event-type
-@subsection event-type
-@Enum event-type
-Values:
-@itemize
-@item :nothing
-@item :delete
-@item :destroy
-@item :expose
-@item :motion-notify
-@item :button-press
-@item :2button-press
-@item :3button-press
-@item :button-release
-@item :key-press
-@item :key-release
-@item :enter-notify
-@item :leave-notify
-@item :focus-change
-@item :configure
-@item :map
-@item :unmap
-@item :property-notify
-@item :selection-clear
-@item :selection-request
-@item :selection-notify
-@item :proximity-in
-@item :proximity-out
-@item :drag-enter
-@item :drag-leave
-@item :drag-motion
-@item :drag-status
-@item :drop-start
-@item :drop-finished
-@item :client-event
-@item :visibility-notify
-@item :no-expose
-@item :scroll
-@item :window-state
-@item :setting
-@item :owner-change
-@item :grab-broken
-@item :damage
-@end itemize
-
-
-@node font-type
-@subsection font-type
-@Enum font-type
-Values:
-@itemize
-@item :font
-@item :fontset
-@end itemize
-
-
-@node gdk-extension-mode
-@subsection gdk-extension-mode
-@Enum gdk-extension-mode
-Values:
-@itemize
-@item :none
-@item :all
-@item :cursor
-@end itemize
-
-
-@node gdk-window-type-hint
-@subsection gdk-window-type-hint
-@Enum gdk-window-type-hint
-Values:
-@itemize
-@item :normal
-@item :dialog
-@item :menu
-@item :toolbar
-@item :splashscreen
-@item :utility
-@item :dock
-@item :desktop
-@item :dropdown-menu
-@item :popup-menu
-@item :tooltip
-@item :notification
-@item :combo
-@item :dnd
-@end itemize
-
-
-@node grab-status
-@subsection grab-status
-@Enum grab-status
-Values:
-@itemize
-@item :success
-@item :already-grabbed
-@item :invalid-time
-@item :not-viewable
-@item :frozen
-@end itemize
-
-
-@node gravity
-@subsection gravity
-@Enum gravity
-Values:
-@itemize
-@item :north-west
-@item :north
-@item :north-east
-@item :west
-@item :center
-@item :east
-@item :south-west
-@item :south
-@item :south-east
-@item :static
+@item @anchor{slot.screen.active-window}active-window. Type: @ref{gdk-window}. Accessor: @anchor{fn.screen-active-window}@code{screen-active-window}. Read-only.
+@item @anchor{slot.screen.composited-p}composited-p. Type: @code{boolean}. Accessor: @anchor{fn.screen-composited-p}@code{screen-composited-p}. Read-only.
+@item @anchor{slot.screen.default-colormap}default-colormap. Type: @ref{gdk-colormap}. Accessor: @anchor{fn.screen-default-colormap}@code{screen-default-colormap}.
+@item @anchor{slot.screen.display}display. Type: @ref{display}. Accessor: @anchor{fn.screen-display}@code{screen-display}. Read-only.
+@item @anchor{slot.screen.display-name}display-name. Type: @code{string}. Accessor: @anchor{fn.screen-display-name}@code{screen-display-name}. Read-only.
+@item @anchor{slot.screen.font-options}font-options. Type: gpointer. Accessor: @anchor{fn.screen-font-options}@code{screen-font-options}.
+@item @anchor{slot.screen.height}height. Type: @code{integer}. Accessor: @anchor{fn.screen-height}@code{screen-height}. Read-only.
+@item @anchor{slot.screen.height-mm}height-mm. Type: @code{integer}. Accessor: @anchor{fn.screen-height-mm}@code{screen-height-mm}. Read-only.
+@item @anchor{slot.screen.n-monitors}n-monitors. Type: @code{integer}. Accessor: @anchor{fn.screen-n-monitors}@code{screen-n-monitors}. Read-only.
+@item @anchor{slot.screen.number}number. Type: @code{integer}. Accessor: @anchor{fn.screen-number}@code{screen-number}. Read-only.
+@item @anchor{slot.screen.resolution}resolution. Type: @code{double-float}. Accessor: @anchor{fn.screen-resolution}@code{screen-resolution}.
+@item @anchor{slot.screen.rgb-colormap}rgb-colormap. Type: @ref{gdk-colormap}. Accessor: @anchor{fn.screen-rgb-colormap}@code{screen-rgb-colormap}. Read-only.
+@item @anchor{slot.screen.rgb-visual}rgb-visual. Type: @ref{visual}. Accessor: @anchor{fn.screen-rgb-visual}@code{screen-rgb-visual}. Read-only.
+@item @anchor{slot.screen.rgba-colormap}rgba-colormap. Type: @ref{gdk-colormap}. Accessor: @anchor{fn.screen-rgba-colormap}@code{screen-rgba-colormap}. Read-only.
+@item @anchor{slot.screen.rgba-visual}rgba-visual. Type: @ref{visual}. Accessor: @anchor{fn.screen-rgba-visual}@code{screen-rgba-visual}. Read-only.
+@item @anchor{slot.screen.root-window}root-window. Type: @ref{gdk-window}. Accessor: @anchor{fn.screen-root-window}@code{screen-root-window}. Read-only.
+@item @anchor{slot.screen.system-colormap}system-colormap. Type: @ref{gdk-colormap}. Accessor: @anchor{fn.screen-system-colormap}@code{screen-system-colormap}. Read-only.
+@item @anchor{slot.screen.system-visual}system-visual. Type: @ref{visual}. Accessor: @anchor{fn.screen-system-visual}@code{screen-system-visual}. Read-only.
+@item @anchor{slot.screen.toplevel-windows}toplevel-windows. Type: list of @ref{gdk-window}. Accessor: @anchor{fn.screen-toplevel-windows}@code{screen-toplevel-windows}. Read-only.
+@item @anchor{slot.screen.visuals}visuals. Type: list of @ref{visual}. Accessor: @anchor{fn.screen-visuals}@code{screen-visuals}. Read-only.
+@item @anchor{slot.screen.width}width. Type: @code{integer}. Accessor: @anchor{fn.screen-width}@code{screen-width}. Read-only.
+@item @anchor{slot.screen.width-mm}width-mm. Type: @code{integer}. Accessor: @anchor{fn.screen-width-mm}@code{screen-width-mm}. Read-only.
+@item @anchor{slot.screen.window-stack}window-stack. Type: list of @ref{gdk-window}. Accessor: @anchor{fn.screen-window-stack}@code{screen-window-stack}. Read-only.
 @end itemize
 
 
-@node owner-change
-@subsection owner-change
-@Enum owner-change
-Values:
-@itemize
-@item :new-owner
-@item :destroy
-@item :close
-@end itemize
-
-
-@node property-state
-@subsection property-state
-@Enum property-state
-Values:
-@itemize
-@item :new-value
-@item :delete
-@end itemize
-
-
-@node scroll-direction
-@subsection scroll-direction
-@Enum scroll-direction
-Values:
-@itemize
-@item :up
-@item :down
-@item :left
-@item :right
-@end itemize
-
-
-@node setting-action
-@subsection setting-action
-@Enum setting-action
-Values:
+Signals:
 @itemize
-@item :new
-@item :changed
-@item :deleted
+@item @anchor{signal.screen.composited-changed}\"composited-changed\". Signature: (instance @ref{screen}) @result{} void. Options: run-last.
+@item @anchor{signal.screen.monitors-changed}\"monitors-changed\". Signature: (instance @ref{screen}) @result{} void. Options: run-last.
+@item @anchor{signal.screen.size-changed}\"size-changed\". Signature: (instance @ref{screen}) @result{} void. Options: run-last.
 @end itemize
 
+@node Gdk Objects
+@section Gdk Objects
 
-@node visibility-state
-@subsection visibility-state
-@Enum visibility-state
-Values:
-@itemize
-@item :unobscured
-@item :partial
-@item :fully-obscured
-@end itemize
+@lowersections
+@include gdk.objects.texi
+@raisesections
 
+@node Gdk Structs
+@section Gdk Structs
 
-@node window-edge
-@subsection window-edge
-@Enum window-edge
-Values:
-@itemize
-@item :north-west
-@item :north
-@item :north-east
-@item :west
-@item :east
-@item :south-west
-@item :south
-@item :south-east
-@end itemize
-
-
-@node gdk Flags
-@section gdk Flags
-
-@menu
-* event-mask::
-* window-hints::
-* window-state::
-@end menu
+@lowersections
+@include gdk.structs.texi
+@raisesections
 
-Reference of flags in package GDK
+@node Gdk Enums
+@section Gdk Enums
 
-@node event-mask
-@subsection event-mask
-@Flags event-mask
-Values:
-@itemize
-@item :exposure-mask
-@item :pointer-motion-mask
-@item :pointer-motion-hint-mask
-@item :button-motion-mask
-@item :button1-motion-mask
-@item :button2-motion-mask
-@item :button3-motion-mask
-@item :button-press-mask
-@item :button-release-mask
-@item :key-press-mask
-@item :key-release-mask
-@item :enter-notify-mask
-@item :leave-notify-mask
-@item :focus-change-mask
-@item :structure-mask
-@item :property-change-mask
-@item :visibility-notify-mask
-@item :proximity-in-mask
-@item :proximity-out-mask
-@item :substructure-mask
-@item :scroll-mask
-@item :all-events-mask
-@end itemize
-
-
-@node window-hints
-@subsection window-hints
-@Flags window-hints
-Values:
-@itemize
-@item :pos
-@item :min-size
-@item :max-size
-@item :base-size
-@item :aspect
-@item :resize-inc
-@item :win-gravity
-@item :user-pos
-@item :user-size
-@end itemize
-
-
-@node window-state
-@subsection window-state
-@Flags window-state
-Values:
-@itemize
-@item :withdrawn
-@item :iconified
-@item :maximized
-@item :sticky
-@item :fullscreen
-@item :above
-@item :below
-@end itemize
+@lowersections
+@include gdk.enums.texi
+@raisesections
 
+@node Gdk Flags
+@section Gdk Flags
 
+@lowersections
+@include gdk.flags.texi
+@raisesections