bitmap_from_window   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/win32.xtm

Implementation

;;; xtlang wrappers ;;;;;
(bind-func bitmap_from_window
  (lambda (window_name:i8*)
    (let ((hwnd (if (null? window_name)
                    (GetForegroundWindow)
                    (FindWindowA window_name null)))
          (rc (RECT 0 0 0 0)))
      (if (null? hwnd)
          (begin (println "could not find window named" (Str hwnd))
                 (tuple 0 0 3:i32 (cast null i8*)))
          (let ((PW_CLIENTONLY 1) ;; to grab full window set to 0
                (DIB_RGB_COLORS 0)
                (BI_RGB 0)
                (BI_PNG:i32 5)
                (res (GetClientRect hwnd rc)) ;; fills rc
                (hdcScreen (GetDC null))
                (info:BITMAPINFO* (alloc))
                (hdc (CreateCompatibleDC hdcScreen))
                (bmp (CreateCompatibleBitmap hdcScreen
                                             (- (right rc) (left rc))
                                             (- (bottom rc) (top rc)))))


Back to Index

Similar Entries

  • -clock:metro-from-host-    scheme
  • -clock:metro-from-host-    scheme
  • AudioBuffer_from_aiff    xtlang
  • AudioBuffer_from_wave    xtlang
  • GUI_window    xtlang
  • Windows-add-libdir-to-PATH    scheme
  • Windows-convert-unix-path    scheme
  • ai_load_ogl_texture_from_buffer    xtlang
  • astra_bitmapmask_t    xtlang
  • cerberus_frq_from_val    xtlang
  • cerberus_octave_from_val    xtlang
  • clock:offset-from-server    scheme
  • comb_fb_from_rtsixty    xtlang
  • filename-from-path    scheme
  • frq_from_val    xtlang
  • frq_from_val    xtlang
  • get_window    xtlang
  • glew-name-from-gl-name    scheme
  • glfw_create_fullscreen_interaction_window    xtlang
  • glfw_create_fullscreen_interaction_window    xtlang
  • glfw_create_fullscreen_window    xtlang
  • glfw_create_fullscreen_window    xtlang
  • glfw_create_interaction_window    xtlang
  • glfw_create_window    xtlang
  • glfw_destroy_window    xtlang
  • glfw_get_window_height    xtlang
  • glfw_get_window_width    xtlang
  • glfw_init_and_create_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_interaction_compatibility_window    xtlang
  • glfw_init_and_create_interaction_window    xtlang
  • glfw_init_and_create_window    xtlang
  • glfw_window_focus_callback:GLFWwindowfocusfun    xtlang
  • glfw_window_position_callback:GLFWwindowposfun    xtlang
  • glfw_window_should_close    xtlang
  • gui_window_size_callback    xtlang
  • half_rectangular_window_func    xtlang
  • half_rectangular_window_func2    xtlang
  • hamming_window_func    xtlang
  • hanning_window_func    xtlang
  • impc:ir:compiler:closure-from-getter    scheme
  • impc:ir:convert-from-pretty-types    scheme
  • impc:ir:get-arity-from-pretty-closure    scheme
  • impc:ir:get-array-type-from-str    scheme
  • impc:ir:get-closure-type-from-str    scheme
  • impc:ir:get-function-type-from-str    scheme
  • impc:ir:get-tuple-type-from-str    scheme
  • impc:ir:get-type-from-pretty-array    scheme
  • impc:ir:get-type-from-pretty-closure    scheme
  • impc:ir:get-type-from-pretty-str    scheme
  • impc:ir:get-type-from-pretty-str-rec    scheme
  • impc:ir:get-type-from-pretty-tuple    scheme
  • impc:ir:get-type-from-pretty-vector    scheme
  • impc:ir:get-type-from-str    scheme
  • impc:ir:get-vector-type-from-str    scheme
  • impc:ti:reverse-set-bangs-from-reified    scheme
  • impc:ti:tuple-list-from-pretty-tuple-str    scheme
  • load_blep_tables_from_blob    unknown
  • make_window_transparent    xtlang
  • octave_from_val    xtlang
  • ocv_namedWindow    xtlang
  • ocv_namedWindow    xtlang
  • ocv_namedWindow    scheme
  • ocv_namedWindow1    xtlang
  • ocv_namedWindow2    xtlang
  • ocv_scheme_release_window    xtlang
  • pc:from-intervals    scheme
  • pc:from-steps    scheme
  • pc:scale-from-chord    scheme
  • pc:scale-from-pc    scheme
  • rectangular_window_func    xtlang
  • set_window_wndproc    xtlang
  • sf_channels_from_file    xtlang
  • sf_frames_from_file    xtlang
  • sf_samples_from_file    xtlang
  • string_list_from_file    xtlang
  • string_list_from_string    xtlang
  • sys:compile-init-ll-from-str    scheme
  • sys:compile-ll-from-str    scheme
  • triangular_window_func    xtlang
  • unix-or-Windows    macro
  • window_hamming    xtlang
  • window_hamming    xtlang
  • window_hanning    xtlang
  • window_hanning    xtlang
  • with-input-from-file    scheme
  • with-input-output-from-to-files    scheme
  • xtmdoc-get-args-from-form    scheme