1 2 #ifndef _STUDIOX_SCREEN_DRIVER_ 3 #define _STUDIOX_SCREEN_DRIVER_ 4 5 #define MAX_SNAP_LINES 6 6 7 enum SNAP_LINE_TYPES { 8 SNAP_LINE_TYPE_LEFT, 9 SNAP_LINE_TYPE_VERTICAL, 10 SNAP_LINE_TYPE_RIGHT, 11 SNAP_LINE_TYPE_TOP, 12 SNAP_LINE_TYPE_HORIZONTAL, 13 SNAP_LINE_TYPE_BOTTOM, 14 SNAP_LINE_TYPE_COUNT 15 }; 16 17 enum SNAP_LINE_DIRECTION { 18 SNAP_LINE_DIRECTION_VERTICAL, 19 SNAP_LINE_DIRECTION_HORIZONTAL 20 }; 21 22 typedef struct { 23 int direction; // Snap line direction (vertical or horizontal) 24 int target_x_y; // Target snapline x/y for vertical/horizontal snapline 25 int target_top_left; // Target snapline top/left for vertical/horizontal snapline 26 int target_bottom_right; // Target snapline bottom/right for vertical/horizontal snapline 27 int source_top_left; // Source snapline top/left for vetical/horizontal snapline 28 int source_bottom_right; // Source snapline bottom/right for vertical/horizontal snapline 29 }SNAPLINE_INFO; 30 31 typedef struct { 32 int grid_space; 33 int crosshair_size; 34 int crosshair_cx; 35 int crosshair_cy; 36 int crosshair_enabled; 37 SNAPLINE_INFO snap_lines[MAX_SNAP_LINES]; 38 int snap_line_count; 39 }GRID_SNAP_INFO; 40 41 GX_WINDOW_ROOT *get_root_window(); 42 GX_DISPLAY *get_target_view_display(); 43 GX_CANVAS *get_target_win_canvas(void); 44 HWND get_target_win_handle(); 45 46 VOID guix_canvas_flush(HDC win_device, int xpos, int ypos, GX_CANVAS* canvas, GX_RECTANGLE* dirty, int scale, GRID_SNAP_INFO* gsi); 47 VOID guix_bitmap_flush(HDC win_device, int xpos, int ypos, int width, VOID* memptr, GX_BMP_INFO* bmpinfo); 48 49 INT guix_studio_create_display(GX_DISPLAY* display, char* name, 50 int xres, int yres, int colorformat, 51 int target_cpu, int IsSynergyD2D, int IsSynergyFontFormat, 52 GX_COLOR* palette, int pal_size, int aliased_font_palsize); 53 54 INT guix_create_app_display(GX_DISPLAY* display, char* name, 55 int xres, int yres, int colorformat, 56 int target_cpu, int IsSynergyD2D, int IsSynergyFontFormat, 57 GX_COLOR* palette, int pal_size, int aliased_font_palsize); 58 59 void guix_studio_delete_display(GX_DISPLAY* display); 60 61 void initialize_guix(HWND hwnd); 62 BOOL guix_configure_target_win_canvas(int xres, int yres, int colorformat, 63 int target_cpu, int IsSynergyD2D, int IsSynergyFontFormat, 64 GX_COLOR* palette, int palsize, int font_palsize); 65 VOID guix_cleanup_target_win_canvas(VOID); 66 void guix_canvas_paint(HDC dc, GX_RECTANGLE dirty, int scale, GRID_SNAP_INFO *gsi); 67 68 #endif