X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=doc%2Fgdk.ref.texi;h=2297411747277d25d96023535712a41a8dcfc30c;hb=a3a7927335e489ac03f5bc094e7e2c89afa178b5;hp=d0626302045aec98a294404106d76159d22ad83c;hpb=08412ba48592934cf6f7e822cd02818373357c30;p=cl-gtk2.git diff --git a/doc/gdk.ref.texi b/doc/gdk.ref.texi index d062630..2297411 100644 --- a/doc/gdk.ref.texi +++ b/doc/gdk.ref.texi @@ -1,1161 +1,181 @@ @menu -* gdk Classes:: -* gdk Structs:: -* gdk Opaque Boxeds:: -* 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: -@itemize -@item display-opened. (@ref{display}) -> @code{null} [run-last] - -@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 - - -@node gdk-window -@subsection gdk-window -@Class gdk-window - -Superclasses: @ref{drawable} - -Slots: -None - -Signals: -None - - -@node graphics-context -@subsection graphics-context -@Class graphics-context - -Superclasses: @ref{g-object} - -Slots: -None - -Signals: -None - - -@node keymap -@subsection keymap -@Class keymap - -Superclasses: @ref{g-object} - -Slots: -None - -Signals: -None - - -@node pango-layout -@subsection pango-layout -@Class pango-layout - -Superclasses: @ref{g-object} - -Slots: -None - -Signals: -None - - -@node pixbuf -@subsection pixbuf -@Class pixbuf - -Superclasses: @ref{g-object} - -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) - - - -@end itemize -Signals: -None - - -@node pixbuf-animation -@subsection pixbuf-animation -@Class pixbuf-animation - -Superclasses: @ref{g-object} - -Slots: -None - -Signals: -None - - -@node pixmap -@subsection pixmap -@Class pixmap - -Superclasses: @ref{drawable} - -Slots: -None - -Signals: -None - - -@node screen -@subsection screen -@Class screen - -Superclasses: @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 Structs -@section gdk Structs - -@menu -* color:: -* event:: -* event-button:: -* event-client:: -* event-client-16:: -* event-client-32:: -* event-client-8:: -* event-configure:: -* event-crossing:: -* event-dnd:: -* event-expose:: -* event-focus:: -* event-grab-broken:: -* event-key:: -* event-motion:: -* event-no-expose:: -* event-owner-change:: -* event-property:: -* event-proximity:: -* event-scroll:: -* event-selection:: -* event-setting:: -* event-visibility:: -* event-window-state:: -* font:: -* geometry:: -* rectangle:: -@end menu - -Reference of structs in package GDK - -@node color -@subsection color -@Class color - -Superclasses: @code{structure-object} - -Subclasses: None - -Slots: -@itemize -@item blue - -@item green - -@item pixel - -@item red - -@end itemize - -@node event -@subsection event -@Class event - -Superclasses: @code{structure-object} - -Subclasses: @ref{event-key}, @ref{event-button}, @ref{event-scroll}, @ref{event-motion}, @ref{event-expose}, @ref{event-visibility}, @ref{event-crossing}, @ref{event-focus}, @ref{event-configure}, @ref{event-property}, @ref{event-selection}, @ref{event-dnd}, @ref{event-proximity}, @ref{event-client}, @ref{event-no-expose}, @ref{event-window-state}, @ref{event-setting}, @ref{event-owner-change}, @ref{event-grab-broken} - -Slots: -@itemize -@item send-event - -@item type - -@item window - -@end itemize - -@node event-button -@subsection event-button -@Class event-button - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item axes - -@item button - -@item device - -@item state - -@item time - -@item type - -@item x - -@item x-root - -@item y - -@item y-root - -@end itemize - -@node event-client -@subsection event-client -@Class event-client - -Superclasses: @ref{event} - -Subclasses: @ref{event-client-8}, @ref{event-client-16}, @ref{event-client-32} - -Slots: -@itemize -@item data-format - -@item message-time - -@item type - -@end itemize - -@node event-client-16 -@subsection event-client-16 -@Class event-client-16 - -Superclasses: @ref{event-client} - -Subclasses: None - -Slots: -@itemize -@item data - -@item data-format - -@end itemize - -@node event-client-32 -@subsection event-client-32 -@Class event-client-32 - -Superclasses: @ref{event-client} - -Subclasses: None - -Slots: -@itemize -@item data - -@item data-format - -@end itemize - -@node event-client-8 -@subsection event-client-8 -@Class event-client-8 - -Superclasses: @ref{event-client} - -Subclasses: None - -Slots: -@itemize -@item data - -@item data-format - -@end itemize - -@node event-configure -@subsection event-configure -@Class event-configure - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item height - -@item type - -@item width - -@item x - -@item y - -@end itemize - -@node event-crossing -@subsection event-crossing -@Class event-crossing - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item detail - -@item focus - -@item mode - -@item state - -@item sub-window - -@item time - -@item type - -@item x - -@item x-root - -@item y - -@item y-root - -@end itemize - -@node event-dnd -@subsection event-dnd -@Class event-dnd - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item drag-context - -@item time - -@item type - -@item x-root - -@item y-root - -@end itemize - -@node event-expose -@subsection event-expose -@Class event-expose - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item area - -@item count - -@item region - -@item type - -@end itemize - -@node event-focus -@subsection event-focus -@Class event-focus - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item in - -@item type - -@end itemize - -@node event-grab-broken -@subsection event-grab-broken -@Class event-grab-broken - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item grab-window - -@item implicit - -@item keyboard - -@item type - -@end itemize - -@node event-key -@subsection event-key -@Class event-key - -Superclasses: @ref{event} - -Subclasses: None - -Slots: +Multihead support is based around two main object types: @itemize -@item group - -@item hardware-keycode - -@item is-modifier - -@item keyval - -@item length - -@item state - -@item string - -@item time - -@item type - +@item @ref{display} +@item @ref{screen} @end itemize -@node event-motion -@subsection event-motion -@Class event-motion +@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. -Superclasses: @ref{event} +@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. -Subclasses: None +The following code samples demonstrate common usage of the objects +described above. -Slots: -@itemize -@item axes - -@item device - -@item is-hint - -@item state - -@item time - -@item type - -@item x +Testing the number of screen on the current display: +@lisp +(use-package :gdk) -@item x-root +(defvar *display* (default-display)) -@item y +(display-name *display*) @result{} ":0.0" -@item y-root +(display-n-screens *display*) @result{} 1 +@end lisp -@end itemize - -@node event-no-expose -@subsection event-no-expose -@Class event-no-expose - -Superclasses: @ref{event} - -Subclasses: None +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 */ -Slots: -@itemize -@item type - -@end itemize - -@node event-owner-change -@subsection event-owner-change -@Class event-owner-change - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item owner - -@item reason - -@item selection - -@item selection-time - -@item time - -@item type - -@end itemize - -@node event-property -@subsection event-property -@Class event-property - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item atom - -@item state - -@item time - -@item type - -@end itemize - -@node event-proximity -@subsection event-proximity -@Class event-proximity - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item device - -@item time - -@item type - -@end itemize - -@node event-scroll -@subsection event-scroll -@Class event-scroll - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item device - -@item direction - -@item state - -@item time - -@item type - -@item x - -@item x-root - -@item y - -@item y-root - -@end itemize - -@node event-selection -@subsection event-selection -@Class event-selection - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item property - -@item requestor - -@item selection - -@item target - -@item time - -@item type - -@end itemize +window = gtk_window_new (GTK_WINDOW_TOPLEVEL); +gtk_window_set_screen (window, second_screen); +@end lisp -@node event-setting -@subsection event-setting -@Class event-setting - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item action - -@item name - -@item type - -@end itemize - -@node event-visibility -@subsection event-visibility -@Class event-visibility - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item state - -@item type - -@end itemize - -@node event-window-state -@subsection event-window-state -@Class event-window-state - -Superclasses: @ref{event} - -Subclasses: None - -Slots: -@itemize -@item changed-mask - -@item new-window-state - -@item type - -@end itemize - -@node font -@subsection font -@Class font - -Superclasses: @code{structure-object} - -Subclasses: None - -Slots: -@itemize -@item ascent - -@item descent - -@item type - -@end itemize - -@node geometry -@subsection geometry -@Class geometry - -Superclasses: @code{structure-object} - -Subclasses: None - -Slots: -@itemize -@item base-height - -@item base-width - -@item gravity - -@item height-increment - -@item max-aspect - -@item max-height - -@item max-width - -@item min-aspect - -@item min-height - -@item min-width - -@item width-increment - -@end itemize - -@node rectangle -@subsection rectangle -@Class rectangle - -Superclasses: @code{structure-object} - -Subclasses: None - -Slots: -@itemize -@item height - -@item width - -@item x - -@item y - -@end itemize - -@node gdk Opaque Boxeds -@section gdk Opaque Boxeds - -@menu -@end menu - -Reference of opaque boxeds in package GDK - -@node gdk Enums -@section gdk Enums +@node display +@subsection display @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:: +* display-name:: +* display-n-screens:: +* display-default-screen:: @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 -@end itemize - +@Class display +@Superclass g-object -@node owner-change -@subsection owner-change -@Enum owner-change -Values: -@itemize -@item :new-owner -@item :destroy -@item :close -@end itemize +@ref{display} controls the keyboard/mouse pointer grabs and a set of @ref{screen}s. +@ref{display} objects purpose are two fold: -@node property-state -@subsection property-state -@Enum property-state -Values: @itemize -@item :new-value -@item :delete +@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 +@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 scroll-direction -@subsection scroll-direction -@Enum scroll-direction -Values: -@itemize -@item :up -@item :down -@item :left -@item :right -@end itemize +@node display-name +@subsubsection display-name +@TypedAccessor {display-name, display, @code{string}} +The name of a @var{display} (e.g. @code{":0.0"}) +@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 setting-action -@subsection setting-action -@Enum setting-action -Values: -@itemize -@item :new -@item :changed -@item :deleted -@end itemize +@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 -@node visibility-state -@subsection visibility-state -@Enum visibility-state -Values: -@itemize -@item :unobscured -@item :partial -@item :fully-obscured +@Class screen +Superclass: @ref{g-object} + +Slots: +@itemize +@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 window-edge -@subsection window-edge -@Enum window-edge -Values: +Signals: @itemize -@item :north-west -@item :north -@item :north-east -@item :west -@item :east -@item :south-west -@item :south -@item :south-east +@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 gdk Flags -@section gdk Flags +@lowersections +@include gdk.objects.texi +@raisesections -@menu -* event-mask:: -* window-hints:: -* window-state:: -@end menu +@node Gdk Structs +@section Gdk Structs -Reference of flags in package GDK +@lowersections +@include gdk.structs.texi +@raisesections -@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 Gdk Enums +@section Gdk Enums +@lowersections +@include gdk.enums.texi +@raisesections -@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 - +@node Gdk Flags +@section Gdk Flags +@lowersections +@include gdk.flags.texi +@raisesections